Karel Zak
04d83a9251
fdisk: move remaining ptes[] code to fdiskdoslabel.c
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:01 +02:00
Karel Zak
3f0ac58755
fdisk: cleanup usage()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:01 +02:00
Karel Zak
5497ba0442
fdisk: move get_nr_sects() fdisk.h
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:01 +02:00
Karel Zak
afb7c83520
fdisk: remove old code to ask user
...
Old code has been broken by design:
* use global variables
* fixed buffer size
* useless within libfdisk
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:01 +02:00
Karel Zak
950edd1a71
fdisk: use libfdisk to ask for partition type
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:01 +02:00
Karel Zak
918afd3f1a
fdisk: remove ugly fatal() function
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:59 +02:00
Karel Zak
3c08cb2df0
fdisk: remove Mac code
...
The code has been used only to detect magic strings, nothing else.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:59 +02:00
Karel Zak
067686d895
libfdisk: (sgi) add driver
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:58 +02:00
Karel Zak
c880065096
fdisk: (sgi) remove dead code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:58 +02:00
Karel Zak
a97422aa15
fdisk: (sgi) rewrite sgi_list_table()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:58 +02:00
Karel Zak
1a9889ad7f
fdisk: (sgi) cleanu sgi_info stuff
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:57 +02:00
Karel Zak
1653f0b0c2
libfdisk: make it possible to reset device properties
...
- remember user C/H/S and sector size
- reset all device properties before create a new label (maybe the
old setting has been affected by previous on-disk label)
- always apply user setting after the reset
- improve topology/geometry debug messages
Note that for fdisk "user C/H/S and sector size" means on command line
specified values. If you override the setting by c/h/s commands in
expert menu then the setting is applied to the current disk label
only. If you create a new disk label (e.g change MBR to GPT) then
fdisk will use the original setting.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:57 +02:00
Karel Zak
9f2809033e
fdisk: move sun commands to sun menu callback
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
8e40a677bd
fdisk: add functions to geometry menu
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
4170ae9cbd
libfdisk: clean up sun geometry stuff
...
- move fdisk_sun_set_* functions to public API file
- remove extra function to set ncyl -- this has to follow regular
geo.cylinders
- set alternative cylinders to zero (to be compatible with parted)
- it seems that the previous code completely ignored relation between
geo.cylinders, sunlabel->acyl and sunlabel->ncyl.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
b9e94cd7f8
fdisk: add GPT specific callback to menu
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
a410f8df0f
fdisk: use new menu infrastructure to verify keys
...
- use generic function to ask for key
- verify the key against the current menu
- call menu callback if defined
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
74fcee985d
fdisk: use remove read_int() usage from fdisk.c
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak
287ce9ed6c
fdisk: make internal command line case sensitive
...
Hey, this is Linux, year 2013...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak
39f01b7b2b
fdisk: use new menus
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak
67dac5c5a3
fdisk: (gpt) add t, v and x to menu
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak
ad3b5e74ba
fdisk: revert add 'G' to create SGI label to the main menu
...
'G' does not make sense, fdisk menus are case insensitive. Yes...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak
414b6b0f90
fdisk: always allow 'p'rint command in expert menu
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:54 +02:00
Karel Zak
d87c7ce2bf
fdisk: add asktype "string" and support UUID partition change
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:54 +02:00
Karel Zak
b4bfbaddfa
libfdisk: (sun) move driver from fdisk to library
...
... and also add fdisk_info_new_partition()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:54 +02:00
Karel Zak
b1b1a7b7e2
fdisk: (sun) consolidate 'p'rint output
...
* use label operation list()
* use generic fdisk geometry output for sun
* don't duplicate geometry information
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:53 +02:00
Karel Zak
a5c1b0fa20
libfdisk: add fdisk_context_enable_details()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:53 +02:00
Karel Zak
3c5fb4757f
libfdisk: add list() label operation
...
... and use it for GPT
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:53 +02:00
Karel Zak
76b86412c6
fdisk: don't use ptes[] in generic code
...
... the array is MBR specific.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-06-12 17:39:09 +02:00
Karel Zak
76f17cf260
fdisk: fix list types
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 14:38:49 +02:00
Karel Zak
d23c661c47
fdisk: no more AIX "support"
...
The whole AIX support in fdisk has been limited to pretty poor AIX
magic string detection and warning that the AIX is unsupported. It's
too expensive to maintain such fdisk driver.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-12 11:37:33 +01:00
Karel Zak
b4fb2a6110
fdisk: (bsd) support non-nested version too
...
note that btrydev() should be unnecessary, regular list_table()
should be enough for all types.
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 15:56:05 +01:00
Karel Zak
641a75ca99
fdisk: use fdisk_ask_partnum() everywhere
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:58 +01:00
Karel Zak
e09435aa53
fdisk: (bds) use nested partition table
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11 13:00:58 +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
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
bbc41eebda
fdisk: sort menu
...
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
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
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
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
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