Skip to content

Instantly share code, notes, and snippets.

diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 13469dc..be5484e 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -5801,8 +5801,8 @@ zfsdev_ioctl(dev_t dev, u_long cmd, caddr_t data, __unused int flag, struct pro
//printf("ioctl minor %d\n", minor);
- error = proc_suser(p); /* Are we superman? */
- if (error) return (error); /* Nope... */
#!/usr/bin/env perl
use Modern::Perl;
foreach my $fs (@ARGV) {
my ($refcount, @refs, %holds);
# get a hash of all subsidiary datasets with references
say "Looking up userrefs for $fs...";
@refs = qx(zfs get -H -r userrefs $fs)
or die "$~\n$^E\n";
foreach my $line (@refs) {
diff --git a/lib/libspl/asm-generic/Makefile.am b/lib/libspl/asm-generic/Makefile.am
index 04db065..07a592a 100644
--- a/lib/libspl/asm-generic/Makefile.am
+++ b/lib/libspl/asm-generic/Makefile.am
@@ -7,7 +7,7 @@ atomic_SOURCE = atomic.c
atomic_ASM = atomic.S
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -fPIC
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -no-flag -fPIC
diff --git a/lib/libspl/asm-generic/Makefile.am b/lib/libspl/asm-generic/Makefile.am
index 04db065..b9f2c1c 100644
--- a/lib/libspl/asm-generic/Makefile.am
+++ b/lib/libspl/asm-generic/Makefile.am
@@ -5,6 +5,7 @@ DEFAULT_INCLUDES += \
atomic_SOURCE = atomic.c
atomic_ASM = atomic.S
+atomic_CFLAGS = -g0
@ilovezfs
ilovezfs / gist:7549222
Created November 19, 2013 17:37
zfsadm
#!/bin/bash
set -e
#defaults:
export DEV_DIR="/Users/joe/Developer"
export INSTALL_DIR="/osxzfs"
export OWNER="joe"
export BRANCH="master"
export ZFS_BRANCH="default"
export SPL_BRANCH="default"
@ilovezfs
ilovezfs / org.openzfsonosx.ilovezfs.zfs.zpool-import.plist
Last active July 5, 2016 17:56
org.openzfsonosx.ilovezfs.zfs.zpool-import.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.openzfsonosx.ilovezfs.zfs.zpool-import</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/zpool</string>
<string>import</string>
@ilovezfs
ilovezfs / gist:7659412
Last active December 29, 2015 10:49
md5s of dmgs
483f1663151167ba9b084c39bc24e95b /Volumes/osx.zfs-20130607/32/bin/real_zdb
5692933ed7ba3a42c9b3333574c275a4 /Volumes/osx.zfs-20130607/32/bin/real_zfs
7cf3250fea20ce58566a26d63dd0d14c /Volumes/osx.zfs-20130607/32/bin/real_zhack
a90335619d54f4c889580c90ec97f375 /Volumes/osx.zfs-20130607/32/bin/real_zinject
1b59c0990ad1a6fcb9ae399de379539a /Volumes/osx.zfs-20130607/32/bin/real_zpool
ba3b4bcc52bd8f5db6991b599f73c416 /Volumes/osx.zfs-20130607/32/bin/real_ztest
1620b8373e86fdf1a184556ac43ee758 /Volumes/osx.zfs-20130607/32/bin/zrun.sh
c24f223ff784ff0732a974789352b524 /Volumes/osx.zfs-20130607/32/lib/libnvpair.1.dylib
4f0fb62ae6b273323aa4b86af7944425 /Volumes/osx.zfs-20130607/32/lib/libnvpair.a
4821a2c222e43a273aedb51effb3d58d /Volumes/osx.zfs-20130607/32/lib/libnvpair.lai
@ilovezfs
ilovezfs / .gitignore
Last active August 8, 2022 10:37
zfsadm
.DS_Store
@ilovezfs
ilovezfs / pathmatch.c
Last active December 30, 2015 14:39
pathmatch
#include <DiskArbitration/DiskArbitration.h>
//clang -o pathmatch pathmatch.c -framework DiskArbitration -framework CoreServices
static const CFStringRef CoreStorageGPTGUID = CFSTR("53746F72-6167-11AA-AA11-00306543ECAC");
static const CFStringRef CoreStorage = CFSTR("CoreStorage");
typedef struct {
DASessionRef session;
DADiskRef disk;
} DADiskSession;
@ilovezfs
ilovezfs / git diff cmd.sh
Last active December 30, 2015 21:49
cmd.sh anywhere
diff --git a/cmd.sh b/cmd.sh
index 0b0f9b6..9f0d8cf 100755
--- a/cmd.sh
+++ b/cmd.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-cmd=$1
+[[ $# -eq 0 ]] && echo "error: need to specify what command to run" >&2 && exit 1
+cmd="$1"
shift