* [PATCH 0/4] pull: couple corrections and bash completion fixes
@ 2014-10-26 22:07 Sami Kerola
2014-10-26 22:07 ` [PATCH 1/4] sfdisk: return deterministic value from sfdisk_deinit() Sami Kerola
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Sami Kerola @ 2014-10-26 22:07 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Hello,
Weekends are too short. When I were checking the bash completion for
swapoff works as expected I found the completion part works, but the
command does not, so the commit message is a little misleading; swap
files still cannot be turned off using uuids or labels.
# swapon --show=name,uuid,label
NAME UUID LABEL
/dev/sda2 37156738-8821-45cf-b3c2-4b884d58f08c foobar
/home/src/util-linux/test-swap bf6237f4-db89-4761-a1a3-275cfc68b114 xyzzy
# swapoff -U bf6237f4-db89-4761-a1a3-275cfc68b114
swapoff: cannot find the device for bf6237f4-db89-4761-a1a3-275cfc68b114
# swapoff -L xyzzy
swapoff: cannot find the device for xyzzy
The problem seems to come from swapoff.c function do_swapoff() call to
mnt_resolve_spec() that performs uuid and label matching only against
block devices. Unfortunately this was as far I got with an attempt to
fix the issue. Either someone else is quicker with the fix, or I'll have
a look of this sometime after next 5 days.
----------------------------------------------------------------
The following changes since commit 819d9a2975de6869f2ae12d551881bb9b732f2e4:
include/debug: fix typo (2014-10-24 11:19:23 +0200)
are available in the git repository at:
git://github.com/kerolasa/lelux-utiliteetit.git 2014wk42
for you to fetch changes up to 1502d7e71f3385f3e358dd26cd22c4cd3eb7b35e:
bash-completion: use swapon label and uuid listing support (2014-10-26 21:09:24 +0000)
----------------------------------------------------------------
Sami Kerola (4):
sfdisk: return deterministic value from sfdisk_deinit()
fstrim: initialize path variable
bash-completion: stop being clever when listing block devices
bash-completion: use swapon label and uuid listing support
bash-completion/addpart | 4 +---
bash-completion/blkdiscard | 4 +---
bash-completion/blkid | 6 +-----
bash-completion/blockdev | 2 +-
bash-completion/cfdisk | 6 +-----
bash-completion/delpart | 6 +-----
bash-completion/fdisk | 12 ++----------
bash-completion/fsck | 3 +--
bash-completion/fsck.minix | 3 +--
bash-completion/lsblk | 3 +--
bash-completion/mkfs | 3 +--
bash-completion/mkfs.bfs | 3 +--
bash-completion/mkfs.minix | 3 +--
bash-completion/partx | 6 +-----
bash-completion/resizepart | 6 +-----
bash-completion/sfdisk | 6 +-----
bash-completion/swapoff | 22 +++-------------------
bash-completion/swapon | 2 +-
bash-completion/wipefs | 4 +---
disk-utils/sfdisk.c | 3 +--
sys-utils/fstrim.c | 2 +-
21 files changed, 24 insertions(+), 85 deletions(-)
--
2.1.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] sfdisk: return deterministic value from sfdisk_deinit()
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
@ 2014-10-26 22:07 ` Sami Kerola
2014-10-26 22:07 ` [PATCH 2/4] fstrim: initialize path variable Sami Kerola
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sami Kerola @ 2014-10-26 22:07 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
disk-utils/sfdisk.c:222:9: warning: variable 'rc' is uninitialized when
used here [-Wuninitialized]
return rc;
disk-utils/sfdisk.c:208:8: note: initialize the variable 'rc' to silence
this warning
int rc;
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
disk-utils/sfdisk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c
index b0332f2..f48d1c7 100644
--- a/disk-utils/sfdisk.c
+++ b/disk-utils/sfdisk.c
@@ -205,7 +205,6 @@ static void sfdisk_init(struct sfdisk *sf)
static int sfdisk_deinit(struct sfdisk *sf)
{
struct fdisk_context *parent;
- int rc;
assert(sf);
assert(sf->cxt);
@@ -219,7 +218,7 @@ static int sfdisk_deinit(struct sfdisk *sf)
fdisk_unref_context(sf->cxt);
memset(sf, 0, sizeof(*sf));
- return rc;
+ return 0;
}
static void backup_sectors(struct sfdisk *sf,
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] fstrim: initialize path variable
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
2014-10-26 22:07 ` [PATCH 1/4] sfdisk: return deterministic value from sfdisk_deinit() Sami Kerola
@ 2014-10-26 22:07 ` Sami Kerola
2014-10-26 22:07 ` [PATCH 3/4] bash-completion: stop being clever when listing block devices Sami Kerola
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Sami Kerola @ 2014-10-26 22:07 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Reading the code this initialization is not necessary, so the change is
mostly about silencing a compiler warning and ensuring the program keeps
on working if there is a future bug that could make uninitialized 'path'
reachable to use.
sys-utils/fstrim.c:247: warning: 'path' may be used uninitialized in this
function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/fstrim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 481a4cb..b18cdb2 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -244,7 +244,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
int main(int argc, char **argv)
{
- char *path;
+ char *path = NULL;
int c, rc, verbose = 0, all = 0;
struct fstrim_range range;
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] bash-completion: stop being clever when listing block devices
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
2014-10-26 22:07 ` [PATCH 1/4] sfdisk: return deterministic value from sfdisk_deinit() Sami Kerola
2014-10-26 22:07 ` [PATCH 2/4] fstrim: initialize path variable Sami Kerola
@ 2014-10-26 22:07 ` Sami Kerola
2014-10-26 22:07 ` [PATCH 4/4] bash-completion: use swapon label and uuid listing support Sami Kerola
2014-10-31 9:47 ` [PATCH 0/4] pull: couple corrections and bash completion fixes Karel Zak
4 siblings, 0 replies; 6+ messages in thread
From: Sami Kerola @ 2014-10-26 22:07 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Various commands such as blkid, cfdisk, fdisk, delpart, and so on listed
only partitions and missed for example disks and volume groups. The
right thing to do is to list all block devices in all for all commands
performing operations with them. This might occasionally list unexpected
devices that I think is lesser bad than missing some.
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764488
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
bash-completion/addpart | 4 +---
bash-completion/blkdiscard | 4 +---
bash-completion/blkid | 6 +-----
bash-completion/blockdev | 2 +-
bash-completion/cfdisk | 6 +-----
bash-completion/delpart | 6 +-----
bash-completion/fdisk | 12 ++----------
bash-completion/fsck | 3 +--
bash-completion/fsck.minix | 3 +--
bash-completion/lsblk | 3 +--
bash-completion/mkfs | 3 +--
bash-completion/mkfs.bfs | 3 +--
bash-completion/mkfs.minix | 3 +--
bash-completion/partx | 6 +-----
bash-completion/resizepart | 6 +-----
bash-completion/sfdisk | 6 +-----
bash-completion/wipefs | 4 +---
17 files changed, 18 insertions(+), 62 deletions(-)
diff --git a/bash-completion/addpart b/bash-completion/addpart
index 2b1e6bb..e9ed793 100644
--- a/bash-completion/addpart
+++ b/bash-completion/addpart
@@ -5,9 +5,7 @@ _addpart_module()
cur="${COMP_WORDS[COMP_CWORD]}"
case $COMP_CWORD in
1)
- local DEVS=''
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- OPTS="--help --version $DEVS"
+ OPTS="--help --version $(lsblk -pnro name)"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
;;
2)
diff --git a/bash-completion/blkdiscard b/bash-completion/blkdiscard
index 310cdfb..aa2f6f6 100644
--- a/bash-completion/blkdiscard
+++ b/bash-completion/blkdiscard
@@ -20,9 +20,7 @@ _blkdiscard_module()
return 0
;;
esac
- local DEVS
- DEVS=''; while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _blkdiscard_module blkdiscard
diff --git a/bash-completion/blkid b/bash-completion/blkid
index 9f97dd9..26e414a 100644
--- a/bash-completion/blkid
+++ b/bash-completion/blkid
@@ -58,11 +58,7 @@ _blkid_module()
return 0
;;
esac
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'part' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _blkid_module blkid
diff --git a/bash-completion/blockdev b/bash-completion/blockdev
index ce986cb..8050c0f 100644
--- a/bash-completion/blockdev
+++ b/bash-completion/blockdev
@@ -4,7 +4,7 @@ _blockdev_module()
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
+ DEVS="$(lsblk -pnro name)"
OPTS="-h -V -q
--report
--getsz
diff --git a/bash-completion/cfdisk b/bash-completion/cfdisk
index 025b044..8921fa3 100644
--- a/bash-completion/cfdisk
+++ b/bash-completion/cfdisk
@@ -23,11 +23,7 @@ _cfdisk_module()
return 0
;;
esac
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro "name,type")
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _cfdisk_module cfdisk
diff --git a/bash-completion/delpart b/bash-completion/delpart
index a4b20c8..d5a92ef 100644
--- a/bash-completion/delpart
+++ b/bash-completion/delpart
@@ -11,11 +11,7 @@ _delpart_module()
esac
case $COMP_CWORD in
1)
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- OPTS="--help --version $DEVICES"
+ OPTS="--help --version $(lsblk -pnro name)"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
;;
2)
diff --git a/bash-completion/fdisk b/bash-completion/fdisk
index 28cdda6..72a2b42 100644
--- a/bash-completion/fdisk
+++ b/bash-completion/fdisk
@@ -6,11 +6,7 @@ _fdisk_module()
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-s'|'--getsz')
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'part' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
;;
'-b'|'--sector-size')
@@ -55,11 +51,7 @@ _fdisk_module()
return 0
;;
esac
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _fdisk_module fdisk
diff --git a/bash-completion/fsck b/bash-completion/fsck
index 04899a0..d61b37f 100644
--- a/bash-completion/fsck
+++ b/bash-completion/fsck
@@ -32,8 +32,7 @@ _fsck_module()
return 0
;;
esac
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _fsck_module fsck
diff --git a/bash-completion/fsck.minix b/bash-completion/fsck.minix
index 1ec9a78..4ed5110 100644
--- a/bash-completion/fsck.minix
+++ b/bash-completion/fsck.minix
@@ -9,9 +9,8 @@ _fsck.minix_module()
return 0
;;
esac
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
OPTS="-l -a -r -v -s -m -f --version"
- COMPREPLY=( $(compgen -W "${OPTS[*]} $DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "${OPTS[*]} $(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _fsck.minix_module fsck.minix
diff --git a/bash-completion/lsblk b/bash-completion/lsblk
index c270255..b5dcb40 100644
--- a/bash-completion/lsblk
+++ b/bash-completion/lsblk
@@ -70,8 +70,7 @@ _lsblk_module()
;;
esac
local DEVS
- DEVS=''; while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _lsblk_module lsblk
diff --git a/bash-completion/mkfs b/bash-completion/mkfs
index 4e6e175..4edc6f0 100644
--- a/bash-completion/mkfs
+++ b/bash-completion/mkfs
@@ -21,8 +21,7 @@ _mkfs_module()
return 0
;;
esac
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS /path/to/file" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name) /path/to/file" -- $cur) )
return 0
}
complete -F _mkfs_module mkfs
diff --git a/bash-completion/mkfs.bfs b/bash-completion/mkfs.bfs
index 4f2923d..1bd67a0 100644
--- a/bash-completion/mkfs.bfs
+++ b/bash-completion/mkfs.bfs
@@ -24,8 +24,7 @@ _mkfs.bfs_module()
return 0
;;
esac
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS /path/to/file" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name) /path/to/file" -- $cur) )
return 0
}
complete -F _mkfs.bfs_module mkfs.bfs
diff --git a/bash-completion/mkfs.minix b/bash-completion/mkfs.minix
index 78c986f..c84a237 100644
--- a/bash-completion/mkfs.minix
+++ b/bash-completion/mkfs.minix
@@ -29,8 +29,7 @@ _mkfs.minix_module()
;;
esac
local DEVS
- while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _mkfs.minix_module mkfs.minix
diff --git a/bash-completion/partx b/bash-completion/partx
index 7b08fa8..5d662fc 100644
--- a/bash-completion/partx
+++ b/bash-completion/partx
@@ -31,11 +31,7 @@ _partx_module()
return 0
;;
esac
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _partx_module partx
diff --git a/bash-completion/resizepart b/bash-completion/resizepart
index c78af15..7e38503 100644
--- a/bash-completion/resizepart
+++ b/bash-completion/resizepart
@@ -11,11 +11,7 @@ _resizepart_module()
esac
case $COMP_CWORD in
1)
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- OPTS="--help --version $DEVICES"
+ OPTS="--help --version $(lsblk -pnro name)"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
;;
2)
diff --git a/bash-completion/sfdisk b/bash-completion/sfdisk
index 609104c..16ada3f 100644
--- a/bash-completion/sfdisk
+++ b/bash-completion/sfdisk
@@ -73,11 +73,7 @@ _sfdisk_module()
return 0
;;
esac
- local DEV TYPE DEVICES=''
- while read DEV TYPE; do
- [ $TYPE = 'disk' ] && DEVICES+="$DEV "
- done < <(lsblk -pnro name,type)
- COMPREPLY=( $(compgen -W "$DEVICES" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _sfdisk_module sfdisk
diff --git a/bash-completion/wipefs b/bash-completion/wipefs
index e0e3286..d735b5a 100644
--- a/bash-completion/wipefs
+++ b/bash-completion/wipefs
@@ -26,9 +26,7 @@ _wipefs_module()
return 0
;;
esac
- local DEVS
- DEVS=''; while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name)
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
return 0
}
complete -F _wipefs_module wipefs
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] bash-completion: use swapon label and uuid listing support
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
` (2 preceding siblings ...)
2014-10-26 22:07 ` [PATCH 3/4] bash-completion: stop being clever when listing block devices Sami Kerola
@ 2014-10-26 22:07 ` Sami Kerola
2014-10-31 9:47 ` [PATCH 0/4] pull: couple corrections and bash completion fixes Karel Zak
4 siblings, 0 replies; 6+ messages in thread
From: Sami Kerola @ 2014-10-26 22:07 UTC (permalink / raw)
To: util-linux; +Cc: kerolasa
Simplifies the script, and makes swapoff to work for files when get
requests by label or uuid.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
bash-completion/swapoff | 22 +++-------------------
bash-completion/swapon | 2 +-
2 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/bash-completion/swapoff b/bash-completion/swapoff
index 60d8572..40dcf05 100644
--- a/bash-completion/swapoff
+++ b/bash-completion/swapoff
@@ -9,25 +9,11 @@ _swapoff_module()
return 0
;;
'-U'|'UUID=')
- # only works for block devices, i.e., not for swap files.
- local SWAPS
- SWAPS="$(swapon --show=TYPE,NAME --raw --noheading | \
- awk '$1 !~ /file/ { print $2 }')"
- [ -z "$SWAPS" ] && return 0
- local UUIDS
- UUIDS="$(lsblk -nrp -o UUID "$SWAPS")"
- COMPREPLY=( $(compgen -W "$UUIDS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(swapon --show=UUID --noheading)" -- $cur) )
return 0
;;
'-L'|'LABEL=')
- # only works for block devices, i.e., not for swap files.
- local SWAPS
- SWAPS="$(swapon --show=TYPE,NAME --raw --noheading | \
- awk '$1 !~ /file/ { print $2 }')"
- [ -z "$SWAPS" ] && return 0
- local LABELS
- LABELS="$(lsblk -nrp -o LABEL "$SWAPS")"
- COMPREPLY=( $(compgen -W "$LABELS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(swapon --show=LABEL --noheading)" -- $cur) )
return 0
;;
'-h'|'--help'|'-V'|'--version')
@@ -46,9 +32,7 @@ _swapoff_module()
return 0
;;
esac
- local DEVS
- DEVS="$(swapon --show=NAME --raw --noheading)"
- COMPREPLY=( $(compgen -W "$DEVS" -- $cur) )
+ COMPREPLY=( $(compgen -W "$(swapon --show=NAME --raw --noheading)" -- $cur) )
return 0
}
complete -F _swapoff_module swapoff
diff --git a/bash-completion/swapon b/bash-completion/swapon
index 7656d4e..f471e07 100644
--- a/bash-completion/swapon
+++ b/bash-completion/swapon
@@ -14,7 +14,7 @@ _swapon_module()
'--show')
# FIXME: how to append to a string with compgen?
local OUTPUT
- OUTPUT="NAME TYPE SIZE USED PRIO"
+ OUTPUT="NAME TYPE SIZE USED PRIO UUID LABEL"
compopt -o nospace
COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
return 0
--
2.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] pull: couple corrections and bash completion fixes
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
` (3 preceding siblings ...)
2014-10-26 22:07 ` [PATCH 4/4] bash-completion: use swapon label and uuid listing support Sami Kerola
@ 2014-10-31 9:47 ` Karel Zak
4 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2014-10-31 9:47 UTC (permalink / raw)
To: Sami Kerola; +Cc: util-linux
On Sun, Oct 26, 2014 at 10:07:05PM +0000, Sami Kerola wrote:
> # swapoff -U bf6237f4-db89-4761-a1a3-275cfc68b114
> swapoff: cannot find the device for bf6237f4-db89-4761-a1a3-275cfc68b114
> # swapoff -L xyzzy
> swapoff: cannot find the device for xyzzy
>
> The problem seems to come from swapoff.c function do_swapoff() call to
> mnt_resolve_spec() that performs uuid and label matching only against
> block devices. Unfortunately this was as far I got with an attempt to
> fix the issue. Either someone else is quicker with the fix, or I'll have
> a look of this sometime after next 5 days.
Hmm... that's necessary to add fallback to swapoff if
mnt_resolve_spec() returns nothing and probe by libblkid all S_ISREG()
sources from get_swaps().
> Sami Kerola (4):
> sfdisk: return deterministic value from sfdisk_deinit()
> fstrim: initialize path variable
> bash-completion: stop being clever when listing block devices
> bash-completion: use swapon label and uuid listing support
All applied, thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-31 9:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-26 22:07 [PATCH 0/4] pull: couple corrections and bash completion fixes Sami Kerola
2014-10-26 22:07 ` [PATCH 1/4] sfdisk: return deterministic value from sfdisk_deinit() Sami Kerola
2014-10-26 22:07 ` [PATCH 2/4] fstrim: initialize path variable Sami Kerola
2014-10-26 22:07 ` [PATCH 3/4] bash-completion: stop being clever when listing block devices Sami Kerola
2014-10-26 22:07 ` [PATCH 4/4] bash-completion: use swapon label and uuid listing support Sami Kerola
2014-10-31 9:47 ` [PATCH 0/4] pull: couple corrections and bash completion fixes Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).