]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agofdisk: (dos) cleanup public function names
Karel Zak [Tue, 25 Jun 2013 14:22:51 +0000 (16:22 +0200)] 
fdisk: (dos) cleanup public function names

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove unnecessary header file stuff
Karel Zak [Tue, 25 Jun 2013 14:14:23 +0000 (16:14 +0200)] 
fdisk: (dos) remove unnecessary header file stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup header file
Karel Zak [Tue, 25 Jun 2013 13:58:36 +0000 (15:58 +0200)] 
fdisk: cleanup header file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) add dos menu callback
Karel Zak [Tue, 25 Jun 2013 13:55:02 +0000 (15:55 +0200)] 
fdisk: (dos) add dos menu callback

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add generic function to set disklabel ID
Karel Zak [Tue, 25 Jun 2013 13:31:21 +0000 (15:31 +0200)] 
libfdisk: add generic function to set disklabel ID

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add generic function to get disklabel ID
Karel Zak [Tue, 25 Jun 2013 12:40:34 +0000 (14:40 +0200)] 
libfdisk: add generic function to get disklabel ID

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (gpt) enlarge columns in list output
Karel Zak [Tue, 25 Jun 2013 12:08:02 +0000 (14:08 +0200)] 
fdisk: (gpt) enlarge columns in list output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove remaining printf() usage
Karel Zak [Tue, 25 Jun 2013 11:15:09 +0000 (13:15 +0200)] 
fdisk: (dos) remove remaining printf() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) clean up list PT functions
Karel Zak [Tue, 25 Jun 2013 11:06:55 +0000 (13:06 +0200)] 
fdisk: (dos) clean up list PT functions

 - use tt.c to list partitions
 - list extended partitions in expert mode

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) fix possible mem-leaks
Karel Zak [Fri, 21 Jun 2013 11:11:59 +0000 (13:11 +0200)] 
fdisk: (dos) fix possible mem-leaks

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) move macro is_dos_compatible()
Karel Zak [Fri, 21 Jun 2013 10:45:30 +0000 (12:45 +0200)] 
fdisk: (dos) move macro is_dos_compatible()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove remaining global variables
Karel Zak [Fri, 21 Jun 2013 10:44:03 +0000 (12:44 +0200)] 
fdisk: (dos) remove remaining global variables

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove global variables for extended partitions
Karel Zak [Fri, 21 Jun 2013 10:37:14 +0000 (12:37 +0200)] 
fdisk: (dos) remove global variables for extended partitions

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) don't check for CHS in move-begin command
Karel Zak [Thu, 20 Jun 2013 09:36:25 +0000 (11:36 +0200)] 
fdisk: (dos) don't check for CHS in move-begin command

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove global ptes[]
Karel Zak [Thu, 20 Jun 2013 09:30:39 +0000 (11:30 +0200)] 
fdisk: (dos) remove global ptes[]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add mbr_get_partition()
Karel Zak [Wed, 19 Jun 2013 13:42:47 +0000 (15:42 +0200)] 
fdisk: add mbr_get_partition()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove inline function from header file
Karel Zak [Wed, 19 Jun 2013 12:42:45 +0000 (14:42 +0200)] 
fdisk: (dos) remove inline function from header file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove unnecessary function
Karel Zak [Wed, 19 Jun 2013 12:39:40 +0000 (14:39 +0200)] 
fdisk: (dos) remove unnecessary function

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) move pte specific function to dos.c
Karel Zak [Wed, 19 Jun 2013 12:36:59 +0000 (14:36 +0200)] 
fdisk: (dos) move pte specific function to dos.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use functions from pt-mbr.h
Karel Zak [Wed, 19 Jun 2013 12:32:48 +0000 (14:32 +0200)] 
fdisk: use functions from pt-mbr.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) use pt-mbr.h
Karel Zak [Tue, 18 Jun 2013 13:27:24 +0000 (15:27 +0200)] 
fdisk: (dos) use pt-mbr.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: rename CHS dos_partition struct members
Karel Zak [Tue, 18 Jun 2013 13:22:31 +0000 (15:22 +0200)] 
fdisk: rename CHS dos_partition struct members

 ... to make the code more compatible with include/pt-mbr.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: rename sys_type to sys_ind
Karel Zak [Tue, 18 Jun 2013 13:11:57 +0000 (15:11 +0200)] 
libblkid: rename sys_type to sys_ind

This makes struct dos_partition more compatible with the current fdisk
code.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoinclude/pt-mbr: add functio to store le
Karel Zak [Tue, 18 Jun 2013 13:06:48 +0000 (15:06 +0200)] 
include/pt-mbr: add functio to store le

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: move MBR definitions to include/pt-mbr.h
Karel Zak [Tue, 18 Jun 2013 13:03:26 +0000 (15:03 +0200)] 
libblkid: move MBR definitions to include/pt-mbr.h

11 years agofdisk: (dos) rename struct partition to dos_partition
Karel Zak [Tue, 18 Jun 2013 12:52:25 +0000 (14:52 +0200)] 
fdisk: (dos) rename struct partition to dos_partition

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) rename members in struct pte
Karel Zak [Tue, 18 Jun 2013 12:45:01 +0000 (14:45 +0200)] 
fdisk: (dos) rename members in struct pte

... to make it more readable.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move dos specific code
Karel Zak [Fri, 14 Jun 2013 13:56:55 +0000 (15:56 +0200)] 
fdisk: move dos specific code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove dead code
Karel Zak [Fri, 14 Jun 2013 13:49:05 +0000 (15:49 +0200)] 
fdisk: remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup warnings
Karel Zak [Fri, 14 Jun 2013 13:17:45 +0000 (15:17 +0200)] 
fdisk: cleanup warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add FDISK_LABEL_FL_REQUIRE_GEOMETRY
Karel Zak [Fri, 14 Jun 2013 12:33:51 +0000 (14:33 +0200)] 
libfdisk: add FDISK_LABEL_FL_REQUIRE_GEOMETRY

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move remaining ptes[] code to fdiskdoslabel.c
Karel Zak [Wed, 12 Jun 2013 15:47:49 +0000 (17:47 +0200)] 
fdisk: move remaining ptes[] code to fdiskdoslabel.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup usage()
Karel Zak [Wed, 12 Jun 2013 15:28:26 +0000 (17:28 +0200)] 
fdisk: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move get_nr_sects() fdisk.h
Karel Zak [Wed, 12 Jun 2013 15:16:39 +0000 (17:16 +0200)] 
fdisk: move get_nr_sects() fdisk.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove old code to ask user
Karel Zak [Wed, 12 Jun 2013 15:10:42 +0000 (17:10 +0200)] 
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>
11 years agofdisk: use libfdisk to ask for partition type
Karel Zak [Wed, 12 Jun 2013 15:09:28 +0000 (17:09 +0200)] 
fdisk: use  libfdisk to ask for partition type

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) use libfdisk for partition number dialog
Karel Zak [Wed, 12 Jun 2013 11:41:44 +0000 (13:41 +0200)] 
fdisk: (bsd) use libfdisk for partition number dialog

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) cleanup bootstrap install code
Karel Zak [Wed, 12 Jun 2013 11:25:57 +0000 (13:25 +0200)] 
fdisk: (bsd) cleanup bootstrap install code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) use libfdisk to ask for label setting
Karel Zak [Wed, 12 Jun 2013 10:28:43 +0000 (12:28 +0200)] 
fdisk: (bsd) use libfdisk to ask for label setting

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) cleanup label initialization
Karel Zak [Wed, 12 Jun 2013 09:33:15 +0000 (11:33 +0200)] 
fdisk: (bsd) cleanup label initialization

 - remove unused variables
 - cleanup code
 - use ask API

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) use ask API for add partition dialog
Karel Zak [Tue, 11 Jun 2013 13:42:50 +0000 (15:42 +0200)] 
fdisk: (bsd) use ask API for add partition dialog

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: copy ask callback from parental context
Karel Zak [Tue, 11 Jun 2013 13:42:08 +0000 (15:42 +0200)] 
libfdisk: copy ask callback from parental context

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) fix offset dialog unit
Karel Zak [Tue, 11 Jun 2013 13:25:48 +0000 (15:25 +0200)] 
fdisk: (dos) fix offset dialog unit

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) remove remaining read_{int,char}() functions
Karel Zak [Tue, 11 Jun 2013 13:05:03 +0000 (15:05 +0200)] 
fdisk: (dos) remove remaining read_{int,char}() functions

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) use ask API for new partition dialog
Karel Zak [Tue, 11 Jun 2013 12:50:15 +0000 (14:50 +0200)] 
fdisk: (dos) use ask API for new partition dialog

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) use ask API to change disk ID
Karel Zak [Tue, 11 Jun 2013 10:03:12 +0000 (12:03 +0200)] 
fdisk: (dos) use ask API to change disk ID

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove ugly fatal() function
Karel Zak [Tue, 11 Jun 2013 08:41:34 +0000 (10:41 +0200)] 
fdisk: remove ugly fatal() function

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove Mac code
Karel Zak [Tue, 11 Jun 2013 08:17:57 +0000 (10:17 +0200)] 
fdisk: remove Mac code

The code has been used only to detect magic strings, nothing else.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolsblk: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 10:04:27 +0000 (12:04 +0200)] 
lsblk: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolscpu: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 10:00:12 +0000 (12:00 +0200)] 
lscpu: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoprlimit: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:55:52 +0000 (11:55 +0200)] 
prlimit: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoswapon: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:51:44 +0000 (11:51 +0200)] 
swapon: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolosetup: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:49:38 +0000 (11:49 +0200)] 
losetup: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agopartx: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:48:16 +0000 (11:48 +0200)] 
partx: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolslocks: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:44:40 +0000 (11:44 +0200)] 
lslocks: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofindmnt: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:39:03 +0000 (11:39 +0200)] 
findmnt: use TT_FL_FREEDATA for tt table

For findmnt(8) output we mix static and libmount data together with
in-findmnt allocated buffers. This patch cleanup all and use allocated
buffers for all output. All is deallocated by tt_free_table().

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agowdctl: use TT_FL_FREEDATA for tt table
Karel Zak [Mon, 10 Jun 2013 09:08:08 +0000 (11:08 +0200)] 
wdctl: use TT_FL_FREEDATA for tt table

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (sgi) add driver
Karel Zak [Mon, 10 Jun 2013 09:03:12 +0000 (11:03 +0200)] 
libfdisk: (sgi) add driver

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) remove dead code
Karel Zak [Fri, 7 Jun 2013 13:34:39 +0000 (15:34 +0200)] 
fdisk: (sgi) remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) rewrite sgi_list_table()
Karel Zak [Fri, 31 May 2013 11:12:15 +0000 (13:12 +0200)] 
fdisk: (sgi) rewrite sgi_list_table()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) small coding style changes
Karel Zak [Fri, 31 May 2013 09:49:42 +0000 (11:49 +0200)] 
fdisk: (sgi) small coding style changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) rdon't use read_chars() to ask yes/no question
Karel Zak [Fri, 31 May 2013 09:18:36 +0000 (11:18 +0200)] 
fdisk: (sgi) rdon't use read_chars() to ask yes/no question

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) cleanup boot file name code
Karel Zak [Fri, 31 May 2013 09:11:45 +0000 (11:11 +0200)] 
fdisk: (sgi) cleanup boot file name code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) use ask API for first/last dialogs
Karel Zak [Thu, 30 May 2013 15:44:54 +0000 (17:44 +0200)] 
fdisk: (sgi) use ask API for first/last dialogs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) fix checksum calculation
Karel Zak [Thu, 30 May 2013 15:43:03 +0000 (17:43 +0200)] 
fdisk: (sgi) fix checksum calculation

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) use stuff ffrom pt-mbr.h and libfdisk
Karel Zak [Thu, 30 May 2013 13:42:30 +0000 (15:42 +0200)] 
fdisk: (sgi) use stuff ffrom pt-mbr.h and libfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: move MBR partition types to include/
Karel Zak [Thu, 30 May 2013 13:22:41 +0000 (15:22 +0200)] 
libblkid: move MBR partition types to include/

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) cleanup devparams flags
Karel Zak [Thu, 30 May 2013 09:31:38 +0000 (11:31 +0200)] 
fdisk: (sgi) cleanup devparams flags

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) remove global freelist
Karel Zak [Wed, 29 May 2013 13:26:23 +0000 (15:26 +0200)] 
fdisk: (sgi) remove global freelist

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) remove unnecessary code
Karel Zak [Wed, 29 May 2013 13:10:03 +0000 (15:10 +0200)] 
fdisk: (sgi) remove unnecessary code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (sun) remove duplicate code
Karel Zak [Wed, 29 May 2013 13:08:12 +0000 (15:08 +0200)] 
libfdisk: (sun) remove duplicate code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) cleanup disk label struct usage
Karel Zak [Wed, 29 May 2013 13:06:33 +0000 (15:06 +0200)] 
fdisk: (sgi) cleanup disk label struct usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) cleanu sgi_info stuff
Karel Zak [Wed, 29 May 2013 12:43:05 +0000 (14:43 +0200)] 
fdisk: (sgi) cleanu sgi_info stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) remove magic strings
Karel Zak [Wed, 29 May 2013 12:23:56 +0000 (14:23 +0200)] 
fdisk: (sgi) remove magic strings

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) use cpu_to_beXX() and beXX_to_cpu()
Karel Zak [Wed, 29 May 2013 12:19:19 +0000 (14:19 +0200)] 
fdisk: (sgi) use cpu_to_beXX() and beXX_to_cpu()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) share disk label definition with libblkid
Karel Zak [Wed, 29 May 2013 11:54:34 +0000 (13:54 +0200)] 
fdisk: (sgi) share disk label definition with libblkid

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: move SGI disklabel definitions to include/
Karel Zak [Wed, 29 May 2013 11:17:06 +0000 (13:17 +0200)] 
libblkid: move SGI disklabel definitions to include/

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: make it possible to reset device properties
Karel Zak [Fri, 24 May 2013 09:48:58 +0000 (11:48 +0200)] 
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>
11 years agofdisk: (sgi) remove printf from code
Karel Zak [Fri, 24 May 2013 07:36:11 +0000 (09:36 +0200)] 
fdisk: (sgi) remove printf from code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup SGI verify disklabel function
Karel Zak [Fri, 24 May 2013 06:55:45 +0000 (08:55 +0200)] 
fdisk: cleanup SGI verify disklabel function

 - the function is also used to detect gaps, so the verbose output has
   to be optional rather than permanently enabled

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move sun commands to sun menu callback
Karel Zak [Thu, 23 May 2013 13:55:35 +0000 (15:55 +0200)] 
fdisk: move sun commands to sun menu callback

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add functions to geometry menu
Karel Zak [Wed, 22 May 2013 13:37:47 +0000 (15:37 +0200)] 
fdisk: add functions to geometry menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move geometry commands to separate menu
Karel Zak [Wed, 22 May 2013 13:11:56 +0000 (15:11 +0200)] 
fdisk: move geometry commands to separate menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: clean up sun geometry stuff
Karel Zak [Wed, 22 May 2013 12:41:58 +0000 (14:41 +0200)] 
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>
11 years agolibfdisk: support GPT partition name (label) change
Karel Zak [Tue, 21 May 2013 14:12:10 +0000 (16:12 +0200)] 
libfdisk: support GPT partition name (label) change

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add FDISK_DEBUG_FRONTEND
Karel Zak [Tue, 21 May 2013 13:30:16 +0000 (15:30 +0200)] 
libfdisk: add FDISK_DEBUG_FRONTEND

Currently we use private libfdisk in fdisk code, because the library
API is not stable yet. Let's add debug flag to make it obvious in the
debug output what is from libfdisk and what is from fdisk frontend.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add GPT specific callback to menu
Karel Zak [Tue, 21 May 2013 13:29:01 +0000 (15:29 +0200)] 
fdisk: add GPT specific callback to menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use new menu infrastructure to verify keys
Karel Zak [Tue, 21 May 2013 13:06:11 +0000 (15:06 +0200)] 
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>
11 years agofdisk: use remove read_int() usage from fdisk.c
Karel Zak [Tue, 21 May 2013 12:09:40 +0000 (14:09 +0200)] 
fdisk: use remove read_int() usage from fdisk.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sgi) don't try to convert MBR to SGI
Karel Zak [Fri, 17 May 2013 13:27:39 +0000 (15:27 +0200)] 
fdisk: (sgi) don't try to convert MBR to SGI

.. because there don't have to be old MBR at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: make internal command line case sensitive
Karel Zak [Fri, 17 May 2013 13:26:31 +0000 (15:26 +0200)] 
fdisk: make internal command line case sensitive

Hey, this is Linux, year 2013...

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use new menus
Karel Zak [Fri, 17 May 2013 13:11:11 +0000 (15:11 +0200)] 
fdisk: use new menus

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add bsd, dos and sgi menus
Karel Zak [Fri, 17 May 2013 13:01:31 +0000 (15:01 +0200)] 
fdisk: add bsd, dos and sgi menus

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: detect menu entries collisions in debug mode
Karel Zak [Fri, 17 May 2013 12:11:51 +0000 (14:11 +0200)] 
fdisk: detect menu entries collisions in debug mode

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add sun menu
Karel Zak [Fri, 17 May 2013 11:44:29 +0000 (13:44 +0200)] 
fdisk: add sun menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add new stuff to display menus
Karel Zak [Fri, 17 May 2013 10:35:23 +0000 (12:35 +0200)] 
fdisk: add new stuff to display menus

fdisk menus:

 - driven by menu and menu_entry structs
 - supports normal and expect mode
 - supports multiple independent menus
 - supports menu separators to make output more readable
 - allows to exclude by whole menu or menu entries by label type

TODO:
 - define per label menus
 - per menu callback
 - sensitive only to keys defined in the currently printed menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: make the library usable with tests
Karel Zak [Fri, 17 May 2013 10:24:05 +0000 (12:24 +0200)] 
libfdisk: make the library usable with tests

We don't have completely initialized all label drivers in the tests, so
make the code more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: remove unnecessary code from test_fdisk_ask
Karel Zak [Fri, 17 May 2013 08:18:57 +0000 (10:18 +0200)] 
libfdisk: remove unnecessary code from test_fdisk_ask

.. 'sun' stuff is already in the library.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (gpt) add t, v and x to menu
Karel Zak [Wed, 15 May 2013 14:07:39 +0000 (16:07 +0200)] 
fdisk: (gpt) add t, v and x to menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: revert add 'G' to create SGI label to the main menu
Karel Zak [Wed, 15 May 2013 13:34:54 +0000 (15:34 +0200)] 
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>