Commit Graph

6911 Commits

Author SHA1 Message Date
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 6d9362988e fdisk: remove common.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak d0ccfeb193 libfdisk: explicitly add COPYING file
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 19c2cc4e75 fdisk: (bsd) final code clean up
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak 2872ffa0e5 fdisk: (bsd) remove xbsd_ prefix
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak 0bf367edf6 fdisk: (bsd) minor code clean up
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 bcef4db443 fdisk: (bsd) coding style, remove unnecessary #ifdef
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:07 +02:00
Karel Zak 0b08fb074a fdisk: (bsd) fix add/link partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 0dc6555cf5 fdisk: (bsd) remove dead code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +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 d5b243144e fdisk: (bsd) remove generic actions from bsd_command_prompt()
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 296b856d42 fdisk: (bsd) remove printf() from the driver code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 87ed95ffc4 fdisk: (bsd) move bsdbuffer to fdisk_bsd_label struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 0efc6c5750 fdisk: (bsd) move global label variables to fdisk_bsd_label struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 0dd3dfb8e3 fdisk: (bsd) write/read PT code cleanup
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:06 +02:00
Karel Zak 30b46e7cb0 libblkid: fix kboff usage in BSD prober
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak e36e16316b fdisk: (bsd) add bsd_get_partition_status()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak bb029cd3bf fdisk: ask for partition in chars
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 181aab4013 libfdisk: allow to address partition by chars
For example BSD uses letters rather tahn numbers to address partition,
the fist partition is 'a', last partition is 'p'.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +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 8a9256f9fc libfdisk: improve nested context initialization
- all label prober() function in fdisk_new_nested_context()
 - don't reset device properties for nested contexts

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 60c1b03620 libfdisk: (dos) cosmetic changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak e11858e273 fdisk: (bsd) clean up header file
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 3e24c3adf1 fdisk: (bsd) use macros from pt-mbr.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak 66ea98478d fdisk: (bsd) use pt-bsd.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:05 +02:00
Karel Zak cc3d127e4c libblkid: move bsd definitions to pt-bsd.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak ef083b7cf5 fdisk: (bsd) clean up BSD_LABEL* macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +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 235adaa605 fdisk: (dos) use libfdisk to ask for partition type
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak 4f79f8872b fdisk: cleanup warning messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak c10937dcaf fdisk: remove nowarn global variable
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 bb58112e74 fdisk: (dos) remove unnecessary header file stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:04 +02:00
Karel Zak c37ebc12a5 fdisk: cleanup header file
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 21fe3dde84 libfdisk: add generic function to get disklabel ID
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak 9af7ed4eab fdisk: (gpt) enlarge columns in list output
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak f61d2632a6 fdisk: (dos) remove remaining printf() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak 1cf67f1c33 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>
2013-09-16 16:47:03 +02:00
Karel Zak ddec0e407e fdisk: (dos) fix possible mem-leaks
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak 28b85e603d fdisk: (dos) move macro is_dos_compatible()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak 8b3d924171 fdisk: (dos) remove remaining global variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak fcea064b70 fdisk: (dos) remove global variables for extended partitions
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00
Karel Zak 6dc30bc6df fdisk: (dos) don't check for CHS in move-begin command
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-09-16 16:47:03 +02:00