Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug#435555: swapoff -a does not handle UUID= and LABEL= in..

 
   Soft32 Home -> Linux -> Bugs Dist RSS
Next:  Bug#435556: p7zip-full: 7za should support -sfx  
Author Message
Kel Modderman

External


Since: Jan 01, 2007
Posts: 33



(Msg. 1) Posted: Wed Aug 01, 2007 10:47 am
Post subject: Bug#435555: swapoff -a does not handle UUID= and LABEL= in fstab
Archived from groups: linux>debian>bugs>dist (more info?)

Package: mount
Version: 2.13~rc2-4
Severity: normal
Tags: patch

While parsing /etc/fstab, swapoff does not make provision for UUID= and LABEL=
identifiers. It needs to resolve the device represented by these tokens to
correctly identify if it is present in /proc/swaps via function
is_in_proc_swaps() and attempting to do_swapoff().

At the moment, swapoff needlessly makes alarming noise at shutdown by
attempting to do stuff to a string rather than a block device, which can be
simulated:

# swapoff -a -v
swapoff on /dev/sda6
swapoff: cannot canonicalize UUID=519625a9-a64c-4a37-9277-1e2470644329: No such file or directory
swapoff on UUID=519625a9-a64c-4a37-9277-1e2470644329

Use fsprobe_get_devname() to resolve actual device name, just as it is done
for swapon -a.

diff -Nrup util-linux-2.13~rc2/mount/swapon.c util-linux-2.13~rc2.patched/mount/swapon.c
--- util-linux-2.13~rc2/mount/swapon.c 2007-06-29 20:19:34.000000000 +1000
+++ util-linux-2.13~rc2.patched/mount/swapon.c 2007-08-02 00:21:48.000000000 +1000
@@ -491,9 +491,18 @@ main_swapoff(int argc, char *argv[]) {
exit(2);
}
while ((fstab = getmntent(fp)) != NULL) {
- if (streq(fstab->mnt_type, MNTTYPE_SWAP) &&
- !is_in_proc_swaps(fstab->mnt_fsname))
- do_swapoff(fstab->mnt_fsname, QUIET);
+ const char *orig_special = fstab->mnt_fsname;
+ const char *special;
+
+ if (!streq(fstab->mnt_type, MNTTYPE_SWAP))
+ continue;
+
+ special = fsprobe_get_devname(orig_special);
+ if (!special)
+ continue;
+
+ if (!is_in_proc_swaps(special))
+ do_swapoff(special, QUIET);
}
fclose(fp);
}
---

Thanks, Kel.


--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug#435553: Add search on package names - Package: reportbug-ng Version: 0.2007.07.19 Severity: wishlist --- Please enter the report below this line. --- I..

Bug#431170: The way to keep entity is documented in debian.. - Hi, It was a bit ambiguous but debiandoc-sgml-doc has appendix which goes in details how to keep entity. Osamu -- ...

Bug#435552: Doesn't detect debcontrol files in non-debian/.. - Package: vim-runtime Version: 1:7.1-022+1 Severity: minor Tags: patch Hi, "vi control" on a debcon...

Bug#435554: pidgin: Info text in About dialog scrolls down - Package: pidgin Version: 2.1.0-1 Severity: minor -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 When opening the About...

Bug#417674: new versions available - Dear Baishampayan, Please do consider packaging the latest version. Thanks. Kumar -- Kumar Appaiah, 458, Jamuna..

Bug#435556: p7zip-full: 7za should support -sfx - Package: p7zip-full Version: 4.47~dfsg.1-1 Severity: normal On Fedora, the p7zip package only includes the 7za binary....
       Soft32 Home -> Linux -> Bugs Dist All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]