summaryrefslogtreecommitdiffstats
path: root/scripts/zfs2zol-patch.sed
diff options
context:
space:
mode:
authorPrakash Surya <[email protected]>2013-08-26 09:23:09 -0700
committerBrian Behlendorf <[email protected]>2013-10-29 10:30:43 -0700
commit37fd6e00a699aff3fea24199497e9484cd218a84 (patch)
treeb3bd498651ddc032a1f4e3f363ca7ad3f201b07c /scripts/zfs2zol-patch.sed
parentc12e3a594a49ed10b7870d950c1f336f78f136cb (diff)
Add script to fix file names in upstream patches
Added a simple sed script to do a search and replace on the Illumos ZFS file names and replace them with the ZFS on Linux equivalent. Example usage: # Replace Illumos paths with Linux paths $ ./scripts/zfs2zol-patch.sed arc.c.patch > arc.c.patch.linux # Ensure the script worked as expected $ diff arc.c.patch arc.c.patch.linux # Apply the patch using Linux paths $ patch -p1 < arc.c.patch.linux Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Prakash Surya <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #1679
Diffstat (limited to 'scripts/zfs2zol-patch.sed')
-rwxr-xr-xscripts/zfs2zol-patch.sed15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/zfs2zol-patch.sed b/scripts/zfs2zol-patch.sed
new file mode 100755
index 000000000..3a7280fd7
--- /dev/null
+++ b/scripts/zfs2zol-patch.sed
@@ -0,0 +1,15 @@
+#!/bin/sed -f
+
+s:usr/src/uts/common/fs/zfs/sys:include/sys:g
+s:usr/src/uts/common/fs/zfs:module/zfs:g
+s:usr/src/lib/libzpool:lib/libzpool:g
+s:usr/src/cmd:cmd:g
+s:usr/src/common/nvpair:module/nvpair:g
+s:usr/src/lib/libzfs/common/libzfs.h:include/libzfs.h:g
+s:usr/src/man/man1m/zfs.1m:man/man8/zfs.8:g
+s:usr/src/uts/common/sys:include/sys:g
+s:usr/src/lib/libzfs_core/common/libzfs_core.h:include/libzfs_core.h:g
+s:usr/src/lib/libzfs/common:lib/libzfs:g
+s:usr/src/lib/libzfs_core/common:lib/libzfs_core:g
+s:lib/libzpool/common/sys:include/sys:g
+s:lib/libzpool/common:lib/libzpool:g