On Thu, Apr 13, 2006 at 11:00:45AM +0200, Loiseleur Michel wrote: > Hello everyone, > > It's my first time in hacking something so deep in linux, so please > don't be too hard on me. It concerns the code packaged in "linux-utils", > I hope I have found the correct mailing list. > > > Here is the problem : > I need a way in shell script to get back the device name from the > label name, in order to restore (ie: format) it correctly in a recovery > solution (mondorescue). > For instance, a call to "e2label" do the job for the ext2/3 kind of > partition. > But for swap partition, there is _no_ way to get it back. The name > didn't appear in /proc/swaps or /proc/partitions. > > Here is my current hacking: > I have developped myself a small "addon" to swapon/swapoff program, > named _swaplabel_, which display the list of device, uuid and name of > all the partitions. It was really easy, this code is old but so damn cool ! > > Here is the question : > 1) Is this possible to enhance linux-utils in order to do the job ? > 2) What's the better way to correct this : > 2.1) a new program as my "swaplabel" ? > 2.2) a new option to swapon ? (there is already a "-l" in it, > but it does not display the label) > 2.3) a patch to the "-l" option ? > 2.4) a patch to add a colum "label" in /proc/partitions ? > 2.5) an other way I didn't think of ? > > thanks for your help, > kind regards, > May be I don't understand something, but there is http://e2fsprogs.sourceforge.net/ and it contains blkid utility and which used for handle LABEL= in /etc/fstab, in spite of name it handles many types of file systems and swap partitions also. -- /Evgeniy - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html