[parted-devel] Could someone please look into this?
Phillip Susi
psusi at ubuntu.com
Fri Jan 13 21:10:14 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please use your reply-to-all button to avoid dropping CCs. Re-added
the mailing list.
On 1/13/2012 3:42 PM, ben wrote:
> Well, that fixed it! Thank you.
>
> But why is that needed? I specified constraint=any so why is it
> still applying A constriant I didn't ask for? It is even more
> confusing since the function for adding a new partition seems to
> ignore that constraint and will put it where I ask it to.
Because the msdos partition table aligns to cylinder boundaries by
default for backward compatibility.
> Also, the docs say to use this to get the first flag:
>
> PedDiskFlag fg = ped_disk_flag_next(0);
>
>
> However I get this error with g++:
>
> partchange.cpp:219:42: error: invalid conversion from ‘int’ to
> ‘PedDiskFlag {aka _PedDiskFlag}’ [-fpermissive]
>
> I needed: ped_disk_get_flag(PED_DISK_FIRST_FLAG) to get the first
> one.
Because in C++ implicit conversion from an integer to an enum is not
allowed. Use (PedDiskFlag)0 instead.
> lastly, I couldn't find anything about the names of flags in the
> Doxygen file. I used ped_disk_flag_next() to iterate through them
> to find "cylinder_alignment."
>
> Thank you.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPEJ22AAoJEJrBOlT6nu75t1IIAMY+GKjsE2TIGc0DRATsFq/B
d9eQXdk6BNGWRSuUddsxZKkRrK/S0XF9HsHyBx1EmXj7IbPCdWyEea2/nh2BOCfQ
DFoWoCOcEhOaWpzYCvzW8OioxgmIJmEcfj5S1bDA0KzHUMo4AubpQIGZvdR/60/G
GXgCUo/LsOJSiuyCcrk0tGkBOoDkx68rMeLVddT9pHTX8xNQgJMnEQcp5JKhAWCf
syKIPp4+6fKTn0aaaWwhR26QCHg4EOFYnriHn7eY7JcN8p2sVM2BOmXV8TISM3KI
9/piN9NE0FoQWpnMGZ0ZVM17o5A3jPVtD2/nzU36yyzNMi1eGYlgRcFEGUlY4fM=
=/qYb
-----END PGP SIGNATURE-----
More information about the parted-devel
mailing list