diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-17 11:51:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-09-18 09:24:52 +0000 |
commit | ae7fad750293c397b0d34cbffdc3cfb321189cb3 (patch) | |
tree | 3a55124ab56323ffd085a2b0dc62dc55eba7417d /main/busybox/0002-swaponoff-add-uuid-label-support.patch | |
parent | fe3e32915f535953856f60a772706a6bd756d806 (diff) | |
download | aports-ae7fad750293c397b0d34cbffdc3cfb321189cb3.tar.bz2 aports-ae7fad750293c397b0d34cbffdc3cfb321189cb3.tar.xz |
main/busybox: 1.14.4. backport support for uuid on swap in fstab
Diffstat (limited to 'main/busybox/0002-swaponoff-add-uuid-label-support.patch')
-rw-r--r-- | main/busybox/0002-swaponoff-add-uuid-label-support.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/main/busybox/0002-swaponoff-add-uuid-label-support.patch b/main/busybox/0002-swaponoff-add-uuid-label-support.patch new file mode 100644 index 00000000..0abdab8e --- /dev/null +++ b/main/busybox/0002-swaponoff-add-uuid-label-support.patch @@ -0,0 +1,58 @@ +From 3e3d6337d442225cc951a2084191dc61afb34661 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <natanael.copa@gmail.com> +Date: Thu, 17 Sep 2009 11:19:20 +0000 +Subject: [PATCH 2/2] swaponoff: add uuid/label support + +This allows swapon -a enable swap when the swap partition is specified by +either UUID=... or LABEL=... in /etc/fstab + +We could have made a separate config option for this but it makes sense +to have it with MOUNT_LABEL as you will need that to parse the rest of +fstab anyway. + +Signed-off-by: Natanael Copa <natanael.copa@gmail.com> +--- + util-linux/Config.in | 1 + + util-linux/swaponoff.c | 7 +++++++ + 2 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/util-linux/Config.in b/util-linux/Config.in +index 5f5adc0..49c57e1 100644 +--- a/util-linux/Config.in ++++ b/util-linux/Config.in +@@ -689,6 +689,7 @@ config FEATURE_MOUNT_LABEL + help + This allows for specifying a device by label or uuid, rather than by + name. This feature utilizes the same functionality as blkid/findfs. ++ This also enables label or uuid support for swapon. + + config FEATURE_MOUNT_NFS + bool "Support mounting NFS file systems" +diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c +index 863f773..d69301f 100644 +--- a/util-linux/swaponoff.c ++++ b/util-linux/swaponoff.c +@@ -11,6 +11,10 @@ + #include <mntent.h> + #include <sys/swap.h> + ++#if ENABLE_FEATURE_MOUNT_LABEL ++#include "volume_id.h" ++#endif ++ + #if ENABLE_FEATURE_SWAPON_PRI + struct globals { + int flags; +@@ -26,6 +30,9 @@ static int swap_enable_disable(char *device) + int status; + struct stat st; + ++#if ENABLE_FEATURE_MOUNT_LABEL ++ resolve_mount_spec(&device); ++#endif + xstat(device, &st); + + #if ENABLE_DESKTOP +-- +1.6.4.2 + |