Results 1 to 3 of 3

Thread: Retrieving device information from the path

  1. #1
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Retrieving device information from the path

    Hi,

    first, I'm new in this forum, so hello to everybody and I hope this isn't the wrong board
    Here's my problem: I'm writing a C++ application and I need to retrieve some information about an USB device (specifically the vendor, filesystem and capacity) knowing its path ("/dev/sdXX"). Is there some library I can use? I tried Solid (I can have access to the correspondent device UDI too) but the only solution seems to list all the existent devices and then compare their paths until they match with mine, but it doesn't seem an efficient solution. Maybe there's a direct approach to do this. Someone has a better idea?

    Thanks in advance,
    Lisa
    Last edited by LisaDearheart; 7th April 2011 at 20:36.
    Nondeterminism means never having to say you're wrong.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Retrieving device information from the path

    If you only want to target Linux systems, you can use DeviceKit:
    http://hal.freedesktop.org/docs/DeviceKit/
    http://hal.freedesktop.org/docs/DeviceKit-disks/

  3. #3
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Retrieving device information from the path

    Yes, it's just for Linux.

    Thanks a lot
    Lisa
    Nondeterminism means never having to say you're wrong.

Similar Threads

  1. Replies: 8
    Last Post: 17th October 2009, 08:10
  2. retrieving signal name in a slot
    By Baschterl in forum Qt Programming
    Replies: 2
    Last Post: 10th November 2008, 20:44
  3. QWebView - retrieving information?
    By lamera in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2008, 17:53
  4. Retrieving a file's icon
    By sbeltz in forum Qt Programming
    Replies: 8
    Last Post: 10th September 2008, 12:35
  5. Retrieving QString from TCHAR
    By GTBuilder in forum Newbie
    Replies: 6
    Last Post: 28th March 2008, 06:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.