[parted-devel] Fwd: libparted 3.1 doesn't show any devices

Aleksey Yakovlev aleksey.yakovlev at gmail.com
Wed Feb 12 23:37:11 UTC 2014


Sorry for the dumb question, I should have run my test under sudo.
The libparted 3.1 works!

~AY

---------- Forwarded message ----------
From: Aleksey Yakovlev <aleksey.yakovlev at gmail.com>
Date: Wed, Feb 12, 2014 at 5:25 PM
Subject: libparted 3.1 doesn't show any devices
To: parted-devel at lists.alioth.debian.org


Hi - I'm new to the libparted. I've built it (Ver 3.1) on Xubuntu 3.11 VM
(running at MacBook OS X 10.9.1) and tried to request a list of devices:

#include <iostream>
#include "parted/parted.h"

using std::cout;
using std::endl;

int main()
{
  unsigned count = 0;
  PedDevice* pd = NULL;
  ped_device_probe_all();
  while (true)
  {
    pd = ped_device_get_next(pd);
    if (pd != NULL)
    {
      cout << "# " << count << endl;
      // ......
      ++count;
    }
    else
    {
      break;
    }
  }
  cout << "Found: " << count << endl;
}

However, it doesn't see any devices, the program returns "Found: 0"

Please help,
Thanks,
Aleksey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20140212/568b12d6/attachment.html>


More information about the parted-devel mailing list