Re: Getting S/N for a thumbdrive

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

 



On Thu, May 24, 2007 at 01:23:24PM -0400, Greg Freemyer wrote:
>  All,
> 
>  What is the kernel API for retrieving the S/N for a thumbdrive?

It's a userspace API, use the volume_id program in the udev package
(it's now also part of util-linux too.)

>  I've tried the userspace tools hdparm and sdparm with no luck.
>  Apparently the kernel APIs they use don't support a thumbdrive.  ie.
>  Basically neither one is giving me much of anything for a thumbdrive.
> 
>  I've found sysfs has the Manufacturer & Model, but I have not found a
>  way to get the serial number.
> 
>  FYI: It is in the dmesg output immediately after plugging in a new
>  thumbdrive, so I know it is retrieved.

Which serial number?  The volume one, or the usb one?  They are and can
be different.

thanks,

greg k-h

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux