lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 9 Dec 2010 12:49:32 -0700
From:	Andreas Dilger <adilger.kernel@...ger.ca>
To:	Greg KH <gregkh@...e.de>
Cc:	Lukas Czerner <lczerner@...hat.com>, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, tytso@....edu, sandeen@...hat.com,
	hch@...radead.org, axboe@...nel.dk
Subject: Re: [RFC PATCH 0/2 v1] Ioctl for reading block queue information

On 2010-12-09, at 12:20, Greg KH wrote:
> On Thu, Dec 09, 2010 at 04:25:35PM +0100, Lukas Czerner wrote:
>> For a long time it has been pretty painful to retrieve informations from
>> /sys/block/*/queue for particular block device. Not only it is painful
>> to retrieve informations within C tool, parsing strings, etc, but one
>> have to run into problem even finding the proper path in sysfs.
> 
> What's wrong with using libudev?  That should give you all of this
> information easily using a .c program without any need to change the
> kernel at all.
> 
> Ick, no, please just use the sysfs files, don't create a new ioctl, they
> are horrid.

Can you please show a real example of how using libudev is less horrid than just calling "ioctl(fd, BLKGETQUEUEINFO, &val)"?

How is trying to map a block device name from /etc/mtab (via getmntent()) into a possibly wildly different block device name in /sys (e.g. /dev/vgroot/lvhome vs. /dev/dm-0 vs. /dev/mapper/vgroot-lvhome => /sys/block/dm-0), then parsing text output considered a "good API"?

Cheers, Andreas





--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ