All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loiseleur Michel <mloiseleur@linagora.com>
To: Evgeniy Dushistov <dushistov@mail.ru>, linux-fsdevel@vger.kernel.org
Subject: Re: Hacking linux-utils for swap label
Date: Thu, 13 Apr 2006 15:12:20 +0200	[thread overview]
Message-ID: <443E4E34.4000005@linagora.com> (raw)
In-Reply-To: <20060413123619.GA3778@rain.homenetwork>

Evgeniy Dushistov a écrit :

>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.
>  
>
Thanks a lot to you. It was ... hum ... not obvious. I can do the job 
with it. No needs to patch anything ! I can parse in shell script the 
output of "blkid".


kind regards,
-- 
Michel

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-04-13 13:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13  9:00 Hacking linux-utils for swap label Loiseleur Michel
2006-04-13 12:16 ` Erik Mouw
2006-04-13 12:34   ` Loiseleur Michel
2006-04-13 12:36 ` Evgeniy Dushistov
2006-04-13 13:12   ` Loiseleur Michel [this message]
2006-04-13 16:37   ` Greg KH
2006-04-13 16:52     ` Theodore Ts'o
2006-04-13 17:10       ` Greg KH
2006-04-13 18:19         ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=443E4E34.4000005@linagora.com \
    --to=mloiseleur@linagora.com \
    --cc=dushistov@mail.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.