summaryrefslogtreecommitdiff
path: root/fdisks/fdisk.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-16fdisk: cleanup usage()Karel Zak1-26/+30
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: move get_nr_sects() fdisk.hKarel Zak1-4/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove old code to ask userKarel Zak1-218/+0
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-16fdisk: use libfdisk to ask for partition typeKarel Zak1-28/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove ugly fatal() functionKarel Zak1-22/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: remove Mac codeKarel Zak1-1/+0
The code has been used only to detect magic strings, nothing else. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (sgi) add driverKarel Zak1-1/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (sgi) remove dead codeKarel Zak1-4/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (sgi) rewrite sgi_list_table()Karel Zak1-7/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (sgi) cleanu sgi_info stuffKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: make it possible to reset device propertiesKarel Zak1-31/+19
- 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-16fdisk: move sun commands to sun menu callbackKarel Zak1-26/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: add functions to geometry menuKarel Zak1-32/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: clean up sun geometry stuffKarel Zak1-3/+0
- 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-16fdisk: add GPT specific callback to menuKarel Zak1-5/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: use new menu infrastructure to verify keysKarel Zak1-12/+14
- 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-16fdisk: use remove read_int() usage from fdisk.cKarel Zak1-16/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: make internal command line case sensitiveKarel Zak1-2/+7
Hey, this is Linux, year 2013... Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: use new menusKarel Zak1-74/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (gpt) add t, v and x to menuKarel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: revert add 'G' to create SGI label to the main menuKarel Zak1-4/+0
'G' does not make sense, fdisk menus are case insensitive. Yes... Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: always allow 'p'rint command in expert menuKarel Zak1-5/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: add asktype "string" and support UUID partition changeKarel Zak1-2/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: (sun) move driver from fdisk to libraryKarel Zak1-13/+1
... and also add fdisk_info_new_partition() Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16fdisk: (sun) consolidate 'p'rint outputKarel Zak1-7/+4
* 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-16libfdisk: add fdisk_context_enable_details()Karel Zak1-0/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16libfdisk: add list() label operationKarel Zak1-9/+5
... and use it for GPT Signed-off-by: Karel Zak <kzak@redhat.com>
2013-06-12fdisk: don't use ptes[] in generic codeKarel Zak1-3/+3
... the array is MBR specific. Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18fdisk: fix list typesKarel Zak1-13/+22
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-12fdisk: no more AIX "support"Karel Zak1-1/+0
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-11fdisk: (bsd) support non-nested version tooKarel Zak1-9/+3
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-11fdisk: use fdisk_ask_partnum() everywhereKarel Zak1-84/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (bds) use nested partition tableKarel Zak1-3/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add disk_partition_is_used()Karel Zak1-15/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add fdisk_partition_toggle_flag()Karel Zak1-8/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (sun) use fdisk_ prefix for label specific public functionsKarel Zak1-6/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: remove global unit variablesKarel Zak1-19/+22
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: sort menuKarel Zak1-11/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: add 'G' to create SGI label to the main menuKarel Zak1-1/+5
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-11fdisk: add callback for ask-numbers APIKarel Zak1-7/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: add FDISK_LABEL_FL_ADDPART_NOPARTNOKarel Zak1-4/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11libfdisk: (gpt) move code from fdisk to libfdiskKarel Zak1-3/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) kill 'partitions' global variableKarel Zak1-26/+38
... and use size_t for partition numbers Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move 'toggle active' code to fdiskdoslabe.cKarel Zak1-15/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move dos specific codeKarel Zak1-18/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: remove dead codeKarel Zak1-6/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move dos_list_table_expert() to fdiskdoslabe.cKarel Zak1-129/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move 'move begin' code to fdiskdoslabe.cKarel Zak1-50/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move fix order code to fdiskdoslabe.cKarel Zak1-136/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-11fdisk: (dos) move list table code to fdiskdoslabe.cKarel Zak1-74/+3
Signed-off-by: Karel Zak <kzak@redhat.com>