tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: st_dev and st_ino addition to mtree(8) spec



In article <b4f63a244bf5ae6394c06061012dda87%helkyn.dyndns.org@localhost>,
Jean-Yves Migeon  <jeanyves.migeon%free.fr@localhost> wrote:
>-=-=-=-=-=-
>
>Hi list,
>
>The attached small patch implements two new keywords within mtree(8): 
>"devid" and "inode".
>
>"devid" allows to log the device on which the entry is found (it 
>corresponds
>to the st_dev from stat(2)), while "inode" is, well, the inode number.
>
>"devid" is somehow problematic as we have a clash with another keyword,
>"device". So if you are not really fond of the name, I would be happy
>to change it to whatever you like provided it reduces confusion.
>
>The purpose is to store an identifier for an entry that can uniquely
>identify a resource on the system. In my case, when combined with 
>"nlink",
>I can use a mtree spec to resolve hardlinks, while this was rather
>tedious before. You could enumerate them through "nlink", but without 
>knowing
>the inode it points to from the spec it was barely useful.
>
>As mtree(8) is now a binary shared between FreeBSD and NetBSD, I prefer
>to submit this small patch for review first before committing. There 
>are maybe
>issues I have not taken care of. Without further remarks on it after a 
>a few
>days (say 3), I will commit it.
>
>Disclaimer: This patch is contributed by the French Network and 
>Information
>Security Agency under the BSD 2-clause license approved by The NetBSD 
>Foundation.
>
>Cheers,

I'd change long long to intmax_t and uintmax_t and use %j{u,d} and commit it..

christos



Home | Main Index | Thread Index | Old Index