[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101127185829.GA19708@suse.de>
Date: Sat, 27 Nov 2010 10:58:29 -0800
From: Greg KH <gregkh@...e.de>
To: Michael Richardson <mcr@...delman.ca>
Cc: linux-kernel@...r.kernel.org, bart@...ie.net
Subject: Re: odd behavior from /sys/block (sysfs)
On Fri, Nov 26, 2010 at 01:36:06PM -0500, Michael Richardson wrote:
>
> {please CC me}
>
> I was capturing data from my laptop's /sys file system as test input
> for some code that needs to grovel through /sys a bit. I found it weird
> that tar got different answers than ls! See below (at end) for original
> observation.
>
> It seems that this is because lstat64() on sysfs returns st_size=0 for
> the link, and tar does not know how to deal with this, while ls does.
> I don't know if it is tar that is wrong, or sysfs.
> lstat64(3) suggests that it is sysfs that is at fault, that it should
> set st_size. The behaviour of ls, suggests that perhaps other systems
> have worked around st_size=0 for symlinks. (I'm on 2.6.32-bpo.5 from debian)
So, what do you think should be changed here?
I wouldn't ever recommend using tar on sysfs as it doesn't make any
sense (sysfs is a virtual file system, like /proc/ and I think that tar
doesn't like /proc either, right?)
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists