Commit graph

6464 commits

Author SHA1 Message Date
Karel Zak
1bf3a03438 fdisk: (dos) use new dialog to ask for prim. partitions
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
c6d69264d0 libfdisk: improve fdisk_ask_partnum()
.. to don't ask is there is only one choice.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
225592d4a3 libfdisk: add disk_partition_is_used()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
e1aee84350 fdisk: (sun) cleanup header file
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
fb1caca70a libfdisk: add fdisk_partition_toggle_flag()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
2b0bc17b64 fdisk: (sun) use fdisk_ prefix for label specific public functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
ec10aa6782 fdisk: remove global unit variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
cb7ce873a5 libfdisk: add info about display units to context
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:57 +01:00
Karel Zak
b3d212f83f fdisk: (sun) use yes/no from libfdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
ccf48af540 libfdisk: add Yes/No to Ask API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
9ff2ce0a54 fdisk: (sun) use Ask API for new-partiton dialog
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
bbc41eebda fdisk: sort menu
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
7e1e36d865 fdisk: allow zero as default offset/size
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
9eac213c5b fdisk: (sun) use fdisk_{info,warnx}
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
7375423cda fdisk: add 'G' to create SGI label to the main menu
For unknown reason you have to go to the expert menu to create SGI
label.  It's inconsistent behavior as we have all "create label"
operations in the main menu.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
44c8647d7b fdisk: (sun) remove dead code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
c69bbca9c1 fdisk: (sun): use ask API, remove global variable
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:56 +01:00
Karel Zak
24fc19a11e libfdisk: add wrapper to ask for numbers
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
cfebc4654e fdisk: (sun) share disk label struct with libblkid
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
9d3d9754e7 libblkid: rename in sun_disklabel for compatibility with fdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
ce337318fa inlude/pt-sun: add flags and tags
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
a08dc0ca89 libblkid: move sun PT definition to include/
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
a1ac3a0ce1 fdisk: (sun) use cpu_to_be* macros, remove other_endian global variable
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
83df5feb98 fdisk: (gpt) use fdisk_{warn,warx,info} functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
3e8f74dc60 fdisk: add callacks for info, warn and warnx Ask API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
ab6ea0e8f2 libfdisk: add info, warn and wanx Ask API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
4114da08d0 libfdisk: extend "ask" API, add support for offsets
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:55 +01:00
Karel Zak
23106a29b0 lib/strutils: simplify strtosize(), return info about suffix
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
416c43a9a5 fdisk: add callback for ask-numbers API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
7845ca8dc2 libfdisk: add "ask" interface
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
46667ba4a5 libfdisk: fix gpt status, don't use xcalloc() in library
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
aace6e9d1c fdisk: correctly initialize pointer to sun label
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
3ea1626dc4 fdisk: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
58d62d2f7e libfdisk: add stuff for unit tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
251d908831 libfdisk: (gpt) fix compiler warnings [-Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
baa7cccc3a libfdisk: add FDISK_LABEL_FL_ADDPART_NOPARTNO
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
9ffeb235d6 fdisk: remove fdisk_label from API functions, add asserts, use size_t
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:54 +01:00
Karel Zak
62d50bbe03 libfdisk: (gpt) move code from fdisk to libfdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:56:21 +01:00
Karel Zak
e3661531e6 fdisk: (dos) kill 'partitions' global variable
... and use size_t for partition numbers

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
47b8e7c002 libfdisk: add part_get_status operation
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
fcf8880029 libfdisk: cleanup fdisk_get_partition_type() returns
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
62a7b31332 fdisk: (dos) move dos specific code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
e76d577627 fdisk: (dos) move 'toggle active' code to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
cc0c4e56aa fdisk: (dos) move dos specific code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
2b18633f51 fdisk: remove dead code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:31 +01:00
Karel Zak
5dfca6343b fdisk: (dos) move dos_list_table_expert() to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
71ee484e0b fdisk: (dos) move 'move begin' code to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
dfc96cbf1f fdisk: (dos) move fix order code to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
6d864a495c fdisk: (dos) move list table code to fdiskdoslabe.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00
Karel Zak
bddd84e7c5 fdisk: use libfdisk label->changed
The patch is huge because it's necessary to add a pointer context to
all read_<foo> functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 12:47:30 +01:00