]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agolibfdisk: use context geometry in SGI and SUN
Karel Zak [Wed, 25 Sep 2013 13:34:34 +0000 (15:34 +0200)] 
libfdisk: use context geometry in SGI and SUN

 * don't call HDIO_GETGEO ioctls in the drivers
 * use context geometry (so user can overwrite it by -C/H/S options)
 * use default geometry is ioctl does not return anything

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: remove remaining set -x
Karel Zak [Wed, 25 Sep 2013 13:33:40 +0000 (15:33 +0200)] 
tests: remove remaining set -x

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update lscpu tests
Karel Zak [Wed, 25 Sep 2013 12:23:48 +0000 (14:23 +0200)] 
tests: update lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: fix possible floating point exception
Karel Zak [Wed, 25 Sep 2013 09:45:59 +0000 (11:45 +0200)] 
libfdisk: fix possible floating point exception

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: gpt: loosen check fot pmbr size in lba
Davidlohr Bueso [Sun, 22 Sep 2013 03:45:16 +0000 (20:45 -0700)] 
libfdisk: gpt: loosen check fot pmbr size in lba

While most disk partitioning tools out there create a pMBR's size in lba
to be the lesser of the whole disk or 2Tib, Microsoft apparently does not[1].
It always sets the entry to the maximum 32-bit limitation - even though a
drive may be smaller than that.

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
11 years agolibfdisk: gpt: avoid unnecessary pmbr check
Davidlohr Bueso [Sun, 22 Sep 2013 03:45:14 +0000 (20:45 -0700)] 
libfdisk: gpt: avoid unnecessary pmbr check

We only jump to the 'check_hybrid' label when a valid pmbr
is detected, so we need not recheck again. Move the label's
logic so it doesn't include the check.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
11 years agolscpu: report cpu min mhz
Davidlohr Bueso [Sun, 22 Sep 2013 03:43:40 +0000 (20:43 -0700)] 
lscpu: report cpu min mhz

The lscpu tool only shows the current and max CPU frequencies, however,
in many scenarios this is not enough. If there are energy saving situations
(like some CPUs being idle, or not fully used) the cpugov can lower this value.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
11 years agopylibmount: rewrite to be py2/py3 universal
Ondrej Oprala [Thu, 29 Aug 2013 12:57:04 +0000 (14:57 +0200)] 
pylibmount: rewrite to be py2/py3 universal

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: support --with-python[={2,3}]
Karel Zak [Fri, 20 Sep 2013 10:42:45 +0000 (12:42 +0200)] 
build-sys: support --with-python[={2,3}]

 * we use pkg-config to get CGLAGS and LIBS, use package specific
   config (e.g. python-config) is non-sense.

 * default is to follow distribution and use pkg-config module name
   "python". This is probably symlink to python2.pc or python3.pc.

 * --with-python=2 forces to pkg-module "python2 >= 2"

 * --with-python=3 forces to pkg-module "python3 >= 3"

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibmount: free username after check
Dave Reisner [Wed, 18 Sep 2013 14:15:29 +0000 (10:15 -0400)] 
libmount: free username after check

Leak reported by valgrind:

==14226== 7 bytes in 1 blocks are definitely lost in loss record 1 of 1
==14226==    at 0x4C2757B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14226==    by 0x5534839: strdup (in /usr/lib/libc-2.18.so)
==14226==    by 0x4E53FE0: mnt_get_username (utils.c:560)
==14226==    by 0x4E456A5: mnt_context_prepare_umount (context_umount.c:413)
==14226==    by 0x4E464F7: mnt_context_umount (context_umount.c:851)
==14226==    by 0x403476: umount_one (umount.c:299)
==14226==    by 0x402B34: main (umount.c:629)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
11 years agolibmount: use memmove when overlap possible
Dave Reisner [Tue, 17 Sep 2013 21:05:09 +0000 (17:05 -0400)] 
libmount: use memmove when overlap possible

When unmounting some mountpoints as an unprivileged user (via the
'user' option in fstab), the umount fails. Debug output of 'umount
/opt' reveals:

17760: libmount: CXT: [0x22890e0]: do umount
17760: libmount: UTILS: moving to /opt parent
17760: libmount: CXT: current directory moved to / [last_component='opt']
17760: libmount: CXT: [0x22890e0]: umount(2) [target='pt', flags=0x00000000]

valgrind shows the problem:

==23544== Source and destination overlap in memcpy(0x58d1370, 0x58d1371, 4)
==23544==    at 0x4C2BBC3: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==23544==    by 0x4E537C3: mnt_chdir_to_parent (utils.c:168)
==23544==    by 0x4E45E4C: mnt_context_do_umount (context_umount.c:601)
==23544==    by 0x4E46513: mnt_context_umount (context_umount.c:855)
==23544==    by 0x403476: umount_one (umount.c:299)
==23544==    by 0x402B34: main (umount.c:629)
==23544==

ref: https://bugs.archlinux.org/task/36968
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
11 years agobash-completion: fix typos in mkfs.bfs logic
Mike Frysinger [Fri, 13 Sep 2013 00:49:04 +0000 (20:49 -0400)] 
bash-completion: fix typos in mkfs.bfs logic

There is no "bfs" command.  Change this file to match the other
mkfs files where we have a "mkfs." prefix.

Reported-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agotests: update fdisk outputs
Karel Zak [Thu, 19 Sep 2013 13:04:14 +0000 (15:04 +0200)] 
tests: update fdisk outputs

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update sun label test
Karel Zak [Thu, 19 Sep 2013 12:17:52 +0000 (14:17 +0200)] 
tests: update sun label test

Note that we use a little different label setting, so the checksums
are also different. For more details see commit
4170ae9cbd3ad54c9c7427212eaae6fdb030b57a.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: refresh fdisk tests
Karel Zak [Wed, 18 Sep 2013 13:38:33 +0000 (15:38 +0200)] 
tests: refresh fdisk tests

11 years agolibfdisk: fix cylinders and sector buffer usage
Karel Zak [Wed, 18 Sep 2013 12:50:54 +0000 (14:50 +0200)] 
libfdisk: fix cylinders and sector buffer usage

 - sector buffer has to be correctly deallocated
 - round to cylinders when use cylinder units in dos driver

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: fix sectorbuffer usage in dos driver
Karel Zak [Wed, 18 Sep 2013 10:50:35 +0000 (12:50 +0200)] 
libfdisk: fix sectorbuffer usage in dos driver

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: fix 'r' in BSD menu
Karel Zak [Tue, 17 Sep 2013 13:58:09 +0000 (15:58 +0200)] 
fdisk: fix 'r' in BSD menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: update test_ranges() code
Karel Zak [Tue, 17 Sep 2013 13:14:51 +0000 (15:14 +0200)] 
libfdisk: update test_ranges() code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove unnecessary test
Karel Zak [Tue, 17 Sep 2013 13:13:15 +0000 (15:13 +0200)] 
fdisk: remove unnecessary test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: bloody revolution in the man page
Karel Zak [Tue, 17 Sep 2013 12:43:30 +0000 (14:43 +0200)] 
fdisk: bloody revolution in the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: use fdisk_warnx() in fdisk_ask_partnum()
Karel Zak [Tue, 17 Sep 2013 11:17:58 +0000 (13:17 +0200)] 
libfdisk: use fdisk_warnx() in fdisk_ask_partnum()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: separate disks by \n in -l output
Karel Zak [Tue, 17 Sep 2013 10:22:55 +0000 (12:22 +0200)] 
fdisk: separate disks by \n in -l output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agosfdisk: fix y/n mismatch
Karel Zak [Tue, 17 Sep 2013 07:46:24 +0000 (09:46 +0200)] 
sfdisk: fix y/n mismatch

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add debug message, use colors for -l
Karel Zak [Tue, 17 Sep 2013 07:42:53 +0000 (09:42 +0200)] 
fdisk: add debug message, use colors for -l

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: fix -l
Karel Zak [Mon, 16 Sep 2013 15:04:57 +0000 (17:04 +0200)] 
fdisk: fix -l

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: remove "gpt support is new" warning
Karel Zak [Mon, 16 Sep 2013 14:48:44 +0000 (16:48 +0200)] 
libfdisk: remove "gpt support is new" warning

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove unused code, coding style changes
Karel Zak [Mon, 16 Sep 2013 14:26:52 +0000 (16:26 +0200)] 
fdisk: remove unused code, coding style changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: make default geom usage more robust
Karel Zak [Mon, 9 Sep 2013 09:24:24 +0000 (11:24 +0200)] 
libfdisk: make default geom usage more robust

.. to avoid SIGFPE

References: https://bugzilla.redhat.com/show_bug.cgi?id=1005566
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: rewrite dump first sector add dump disklabel command
Karel Zak [Tue, 3 Sep 2013 15:36:35 +0000 (17:36 +0200)] 
fdisk: rewrite dump first sector add dump disklabel command

Expert command (m for help): D

PMBR: offset = 0, size = 512 bytes.
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
*
000001c0  01 00 ee fe ff ff 01 00  00 00 ff 9f 0f 00 00 00
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa

GPT Header: offset = 512, size = 512 bytes.
00000200  45 46 49 20 50 41 52 54  00 00 01 00 00 02 00 00
00000210  ae 36 81 28 00 00 00 00  01 00 00 00 00 00 00 00
00000220  ff 9f 0f 00 00 00 00 00  00 08 00 00 00 00 00 00
00000230  de 9f 0f 00 00 00 00 00  e0 9d d8 d5 d6 da 1a 44
00000240  98 57 e4 11 64 88 ce 3b  02 00 00 00 00 00 00 00
00000250  80 00 00 00 80 00 00 00  4b c7 c9 54 00 00 00 00
00000260  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
*

GPT Entries: offset = 1024, size = 16384 bytes.
00000400  af 3d c6 0f 83 84 72 47  8e 79 3d 69 d8 47 7d e4
00000410  bc ae 48 5e 22 e5 ca 4c  aa 98 14 6d c9 1d 72 f4
00000420  00 08 00 00 00 00 00 00  de 9f 0f 00 00 00 00 00
00000430  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
*

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) support for disklabel dump
Karel Zak [Tue, 3 Sep 2013 15:36:04 +0000 (17:36 +0200)] 
libfdisk: (gpt) support for disklabel dump

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add fdisk_locate_disklabel()
Karel Zak [Tue, 3 Sep 2013 15:35:15 +0000 (17:35 +0200)] 
libfdisk: add fdisk_locate_disklabel()

The function returns offset and size of disklabel elements.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) use generic 'created partition' message
Karel Zak [Tue, 3 Sep 2013 11:43:26 +0000 (13:43 +0200)] 
libfdisk: (gpt) use generic 'created partition' message

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: use fdisk_colon() and fdisk_sinfo()
Karel Zak [Tue, 3 Sep 2013 11:29:58 +0000 (13:29 +0200)] 
libfdisk: use fdisk_colon() and fdisk_sinfo()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: extend fdisk_info() functionality
Karel Zak [Tue, 3 Sep 2013 11:28:02 +0000 (13:28 +0200)] 
libfdisk: extend fdisk_info() functionality

 - add per message flags
 - add fdisk_colon() for "foo bar: bla bla..." messages
 - add fdisk_sinfo() as smart version of fdisk_info()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use fdisk_{info,warn} on more places
Karel Zak [Tue, 3 Sep 2013 10:18:33 +0000 (12:18 +0200)] 
fdisk: use fdisk_{info,warn} on more places

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) more robust PMBR partition size check
Karel Zak [Mon, 2 Sep 2013 11:15:09 +0000 (13:15 +0200)] 
libfdisk: (gpt) more robust PMBR partition size check

According UEFI specification at least one (does not mean that the
first) partition is 0xFF, it makes sense to check the size of the
partition rather than check the first partition.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add -L to colorize output
Karel Zak [Mon, 2 Sep 2013 08:54:30 +0000 (10:54 +0200)] 
fdisk: add -L to colorize output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: improve info output
Karel Zak [Fri, 30 Aug 2013 14:12:16 +0000 (16:12 +0200)] 
fdisk: improve info output

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: use fdisk_info() to print geometry
Karel Zak [Fri, 30 Aug 2013 13:47:50 +0000 (15:47 +0200)] 
fdisk: use fdisk_info() to print geometry

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: -l refactoring
Karel Zak [Fri, 30 Aug 2013 13:20:01 +0000 (15:20 +0200)] 
fdisk: -l refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: mark -s option as deprecated
Karel Zak [Fri, 30 Aug 2013 11:34:16 +0000 (13:34 +0200)] 
fdisk: mark -s option as deprecated

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: main() refactoring
Karel Zak [Fri, 30 Aug 2013 11:26:24 +0000 (13:26 +0200)] 
fdisk: main() refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add fdisk_has_user_device_properties()
Karel Zak [Fri, 30 Aug 2013 11:06:15 +0000 (13:06 +0200)] 
libfdisk: add fdisk_has_user_device_properties()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup header file
Karel Zak [Fri, 30 Aug 2013 08:46:37 +0000 (10:46 +0200)] 
fdisk: cleanup header file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: provide more details about GPT
Karel Zak [Fri, 12 Jul 2013 10:35:16 +0000 (12:35 +0200)] 
libfdisk: provide more details about GPT

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: move sync() and reread PT code from fdisk to libfdisk
Karel Zak [Fri, 12 Jul 2013 09:57:44 +0000 (11:57 +0200)] 
libfdisk: move sync() and reread PT code from fdisk to libfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup write table code
Karel Zak [Fri, 12 Jul 2013 09:38:05 +0000 (11:38 +0200)] 
fdisk: cleanup write table code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move remaining actions to menu callbacks
Karel Zak [Fri, 12 Jul 2013 09:31:12 +0000 (11:31 +0200)] 
fdisk: move remaining actions to menu callbacks

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move expect actions to menu callback
Karel Zak [Fri, 12 Jul 2013 08:44:35 +0000 (10:44 +0200)] 
fdisk: move expect actions to menu callback

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: consolidate code in fdisk.c
Karel Zak [Thu, 11 Jul 2013 16:03:54 +0000 (18:03 +0200)] 
fdisk: consolidate code in fdisk.c

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: cleanup SGI functions names
Karel Zak [Thu, 11 Jul 2013 15:38:13 +0000 (17:38 +0200)] 
libfdisk: cleanup SGI functions names

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup sgi menu callbackswq
Karel Zak [Thu, 11 Jul 2013 15:08:45 +0000 (17:08 +0200)] 
fdisk: cleanup sgi menu callbackswq

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: move "create label" actions to menu callback
Karel Zak [Thu, 11 Jul 2013 14:56:00 +0000 (16:56 +0200)] 
fdisk: move "create label" actions to menu callback

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove common.h
Karel Zak [Wed, 10 Jul 2013 15:39:22 +0000 (17:39 +0200)] 
fdisk: remove common.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: explicitly add COPYING file
Karel Zak [Wed, 10 Jul 2013 15:33:09 +0000 (17:33 +0200)] 
libfdisk: explicitly add COPYING file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add bsd driver
Karel Zak [Wed, 10 Jul 2013 15:30:08 +0000 (17:30 +0200)] 
libfdisk: add bsd driver

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) final code clean up
Karel Zak [Wed, 10 Jul 2013 15:10:58 +0000 (17:10 +0200)] 
fdisk: (bsd) final code clean up

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) remove xbsd_ prefix
Karel Zak [Wed, 10 Jul 2013 15:08:37 +0000 (17:08 +0200)] 
fdisk: (bsd) remove xbsd_ prefix

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) minor code clean up
Karel Zak [Wed, 10 Jul 2013 15:07:40 +0000 (17:07 +0200)] 
fdisk: (bsd) minor code clean up

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) rewrite list disklabel function
Karel Zak [Wed, 10 Jul 2013 15:00:11 +0000 (17:00 +0200)] 
fdisk: (bsd) rewrite list disklabel function

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) coding style, remove unnecessary #ifdef
Karel Zak [Wed, 10 Jul 2013 13:35:27 +0000 (15:35 +0200)] 
fdisk: (bsd) coding style, remove unnecessary #ifdef

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) fix add/link partition
Karel Zak [Wed, 10 Jul 2013 13:30:49 +0000 (15:30 +0200)] 
fdisk: (bsd) fix add/link partition

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) remove dead code
Karel Zak [Wed, 10 Jul 2013 13:12:10 +0000 (15:12 +0200)] 
fdisk: (bsd) remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) *OSF --> *BSD
Karel Zak [Wed, 10 Jul 2013 12:59:49 +0000 (14:59 +0200)] 
fdisk: (bsd) *OSF --> *BSD

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) implement regular bsd menu callback
Karel Zak [Wed, 10 Jul 2013 12:54:25 +0000 (14:54 +0200)] 
fdisk: (bsd) implement regular bsd menu callback

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) remove generic actions from bsd_command_prompt()
Karel Zak [Wed, 10 Jul 2013 12:31:02 +0000 (14:31 +0200)] 
fdisk: (bsd) remove generic actions from bsd_command_prompt()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: allow to exchange context pointer in menu callbacks
Karel Zak [Wed, 10 Jul 2013 12:17:58 +0000 (14:17 +0200)] 
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>
11 years agofdisk: (bsd) remove printf() from the driver code
Karel Zak [Wed, 10 Jul 2013 11:12:05 +0000 (13:12 +0200)] 
fdisk: (bsd) remove printf() from the driver code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) move bsdbuffer to fdisk_bsd_label struct
Karel Zak [Wed, 10 Jul 2013 11:01:24 +0000 (13:01 +0200)] 
fdisk: (bsd) move bsdbuffer to fdisk_bsd_label struct

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) move global label variables to fdisk_bsd_label struct
Karel Zak [Wed, 10 Jul 2013 10:24:53 +0000 (12:24 +0200)] 
fdisk: (bsd) move global label variables to fdisk_bsd_label struct

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) write/read PT code cleanup
Karel Zak [Fri, 28 Jun 2013 09:37:54 +0000 (11:37 +0200)] 
fdisk: (bsd) write/read PT code cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix kboff usage in BSD prober
Karel Zak [Fri, 28 Jun 2013 08:16:06 +0000 (10:16 +0200)] 
libblkid: fix kboff usage in BSD prober

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) add bsd_get_partition_status()
Karel Zak [Thu, 27 Jun 2013 12:21:43 +0000 (14:21 +0200)] 
fdisk: (bsd) add bsd_get_partition_status()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: ask for partition in chars
Karel Zak [Thu, 27 Jun 2013 12:21:07 +0000 (14:21 +0200)] 
fdisk: ask for partition in chars

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: allow to address partition by chars
Karel Zak [Thu, 27 Jun 2013 12:18:57 +0000 (14:18 +0200)] 
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>
11 years agofdisk: improve menus to make it more usable for BSD label
Karel Zak [Thu, 27 Jun 2013 09:26:00 +0000 (11:26 +0200)] 
fdisk: improve menus to make it more usable for BSD label

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) cleanup driver initialization
Karel Zak [Thu, 27 Jun 2013 08:54:19 +0000 (10:54 +0200)] 
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>
11 years agolibfdisk: improve nested context initialization
Karel Zak [Thu, 27 Jun 2013 08:52:34 +0000 (10:52 +0200)] 
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>
11 years agolibfdisk: (dos) cosmetic changes
Karel Zak [Wed, 26 Jun 2013 11:29:50 +0000 (13:29 +0200)] 
libfdisk: (dos) cosmetic changes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) clean up header file
Karel Zak [Wed, 26 Jun 2013 11:18:50 +0000 (13:18 +0200)] 
fdisk: (bsd) clean up header file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) use macros from pt-mbr.h
Karel Zak [Wed, 26 Jun 2013 09:46:09 +0000 (11:46 +0200)] 
fdisk: (bsd) use macros from pt-mbr.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) use pt-bsd.h
Karel Zak [Wed, 26 Jun 2013 09:32:19 +0000 (11:32 +0200)] 
fdisk: (bsd) use pt-bsd.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: move bsd definitions to pt-bsd.h
Karel Zak [Wed, 26 Jun 2013 09:32:06 +0000 (11:32 +0200)] 
libblkid: move bsd definitions to pt-bsd.h

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (bsd) clean up BSD_LABEL* macros
Karel Zak [Wed, 26 Jun 2013 09:11:59 +0000 (11:11 +0200)] 
fdisk: (bsd) clean up BSD_LABEL* macros

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: move mbr code to the library
Karel Zak [Wed, 26 Jun 2013 08:21:31 +0000 (10:21 +0200)] 
libfdisk: move mbr code to the library

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (dos) use libfdisk to ask for partition type
Karel Zak [Wed, 26 Jun 2013 06:54:01 +0000 (08:54 +0200)] 
fdisk: (dos) use libfdisk to ask for partition type

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: cleanup warning messages
Karel Zak [Tue, 25 Jun 2013 14:57:56 +0000 (16:57 +0200)] 
fdisk: cleanup warning messages

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: remove nowarn global variable
Karel Zak [Tue, 25 Jun 2013 14:40:01 +0000 (16:40 +0200)] 
fdisk: remove nowarn global variable

Signed-off-by: Karel Zak <kzak@redhat.com>
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>