Commit Graph

27 Commits

Author SHA1 Message Date
Karel Zak 8930996828 fdisk: move expect actions to menu callback
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:08 +02:00
Karel Zak ac84272d7d libfdisk: cleanup SGI functions names
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak aae727f2f5 fdisk: cleanup sgi menu callbackswq
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak b3ac22eff3 fdisk: move "create label" actions to menu callback
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak d5b2b8dbbb libfdisk: add bsd driver
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak e563f05525 fdisk: (bsd) rewrite list disklabel function
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak 22ddf54705 fdisk: (bsd) *OSF --> *BSD
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak b529ea2abc fdisk: (bsd) implement regular bsd menu callback
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak a47fec81b2 fdisk: allow to exchange context pointer in menu callbacks
... to make it possible to switch to nested contexts (nested partition
tables).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 7e937b7774 fdisk: improve menus to make it more usable for BSD label
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 818d792461 fdisk: (bsd) cleanup driver initialization
- assume DOS partition only for nested BSD (cxt->parent is set)
 - don't create BSD label in label probe function, require
   fdisk_create_disklabel() call

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 5099226711 libfdisk: move mbr code to the library
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak f8ad389986 fdisk: (dos) cleanup public function names
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak f02fecd19a fdisk: (dos) add dos menu callback
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak 35b1f0a4c4 libfdisk: add generic function to set disklabel ID
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +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 be9ba6f3f9 fdisk: move geometry commands to separate menu
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak 1054699ccd libfdisk: support GPT partition name (label) change
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:56 +02:00
Karel Zak 36050e7001 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>
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 39f01b7b2b fdisk: use new menus
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak 6ae5e1e09c fdisk: add bsd, dos and sgi menus
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak 3b4f9f1644 fdisk: detect menu entries collisions in debug mode
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak 2a1a67df86 fdisk: add sun menu
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:46:55 +02:00
Karel Zak 161b0d1aa9 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>
2013-09-16 16:46:55 +02:00