Find the answer to your Linux question:
Results 1 to 3 of 3
Am doing a simple partition imaging program. Am using libparted for partition things. Before that I want to list the available hard disks (/dev names) attached to the PC Programmatically. ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    Lightbulb Listing Hard Drives programmatically.

    Am doing a simple partition imaging program. Am using libparted for partition things. Before that I want to list the available hard disks (/dev names) attached to the PC Programmatically. Please help. Thanks in advance.

  2. #2
    Just Joined!
    Join Date
    Jan 2010
    Posts
    27
    You need to read on libparted API.

    I've found following documentation at www .gnu.org/software/parted/api/group__PedDevice.html#_details

    Quote Originally Posted by libparted: PedDevice

    When ped_device_probe_all() is called, libparted attempts to detect all devices. It constructs a list which can be accessed with ped_device_get_next().

    If you want to use a device that isn't on the list, use ped_device_get().
    Last edited by saulius2; 01-29-2011 at 08:09 AM.

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3
    Gotcha. Many thanks 'saulius2'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...