]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
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>
11 years agofdisk: always allow 'p'rint command in expert menu
Karel Zak [Wed, 15 May 2013 12:07:14 +0000 (14:07 +0200)] 
fdisk: always allow 'p'rint command in expert menu

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) print UUID and NAME in expert mode only
Karel Zak [Wed, 15 May 2013 12:06:34 +0000 (14:06 +0200)] 
libfdisk: (gpt) print UUID and NAME in expert mode only

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) cleanup structs members names
Karel Zak [Wed, 15 May 2013 11:43:00 +0000 (13:43 +0200)] 
libfdisk: (gpt) cleanup structs members names

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: add asktype "string" and support UUID partition change
Karel Zak [Wed, 15 May 2013 11:33:24 +0000 (13:33 +0200)] 
fdisk: add asktype "string" and support UUID partition change

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add asktype "string" and support UUID partition change
Karel Zak [Wed, 15 May 2013 11:33:24 +0000 (13:33 +0200)] 
libfdisk: add asktype "string" and support UUID partition change

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (sun) move driver from fdisk to library
Karel Zak [Thu, 2 May 2013 13:40:36 +0000 (15:40 +0200)] 
libfdisk: (sun) move driver from fdisk to library

 ... and also add fdisk_info_new_partition()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add fdisk_scround()
Karel Zak [Thu, 2 May 2013 12:54:55 +0000 (14:54 +0200)] 
libfdisk: add fdisk_scround()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (gpt, sun) use fdisk_partname()
Karel Zak [Thu, 2 May 2013 11:39:46 +0000 (13:39 +0200)] 
fdisk: (gpt, sun) use fdisk_partname()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add fdisk_partname()
Karel Zak [Thu, 2 May 2013 11:39:01 +0000 (13:39 +0200)] 
libfdisk: add fdisk_partname()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sun) use tt.c to list disk label
Karel Zak [Thu, 2 May 2013 10:29:01 +0000 (12:29 +0200)] 
fdisk: (sun) use tt.c to list disk label

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sun) consolidate 'p'rint output
Karel Zak [Thu, 2 May 2013 09:49:28 +0000 (11:49 +0200)] 
fdisk: (sun) consolidate 'p'rint output

 * use label operation list()
 * use generic fdisk geometry output for sun
 * don't duplicate geometry information

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add fdisk_context_enable_details()
Karel Zak [Thu, 2 May 2013 09:23:25 +0000 (11:23 +0200)] 
libfdisk: add fdisk_context_enable_details()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add list() label operation
Karel Zak [Tue, 30 Apr 2013 09:57:30 +0000 (11:57 +0200)] 
libfdisk: add list() label operation

... and use it for GPT

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (gpt) use lib/tt.c to list partitions
Karel Zak [Mon, 29 Apr 2013 13:30:55 +0000 (15:30 +0200)] 
libfdisk: (gpt) use lib/tt.c to list partitions

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add new 'ask' type TABLE
Karel Zak [Mon, 29 Apr 2013 13:29:48 +0000 (15:29 +0200)] 
libfdisk: add new 'ask' type TABLE

The new type could be used to print table-like output (for example
list of the partitions).

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/tt: add TT_FL_FREEDATA
Karel Zak [Mon, 29 Apr 2013 13:27:42 +0000 (15:27 +0200)] 
lib/tt: add TT_FL_FREEDATA

... to call free() for line data.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofdisk: (sun) remove dead code
Karel Zak [Tue, 23 Apr 2013 13:25:53 +0000 (15:25 +0200)] 
fdisk: (sun) remove dead code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoagetty: add \S to output /etc/os-release data
Karel Zak [Thu, 12 Sep 2013 10:44:09 +0000 (12:44 +0200)] 
agetty: add \S to output /etc/os-release data

This patch allows to use a new \S or \S{VARNAME} sequence in the
/etc/issue file. The sequence prints data from /etc/os-release.  The
reason is to keep /etc/issue file distribution and release
independent.

The \S{ANSI_COLOR} is converted to the real terminal escape seq.

For example:

   \S
   Kernel \r on an \m (\l)

or more complex example:

   Welcome to \S{ANSI_COLOR}\S{NAME}\e0m \S{VERSION}
   Report bugs at \S{BUG_REPORT_URL}.

See http://www.freedesktop.org/software/systemd/man/os-release.html
fr more details about /etc/issue.

Based on patch from Bill Nottingham <notting@redhat.com>.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agobuild-sys: add *vim and clang_complete to gitignore
Karel Zak [Thu, 12 Sep 2013 09:11:15 +0000 (11:11 +0200)] 
build-sys: add *vim and clang_complete to gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agorev: fix new line regression
Sami Kerola [Tue, 10 Sep 2013 19:51:14 +0000 (20:51 +0100)] 
rev: fix new line regression

Commit 4b4eb34004378fe70259acd8f2f859e7b5cc3726 made output incorrect for
input lines that does not have new line.  For example

$ printf "a b c\n1 2 3" | rev
c b a
 2 13

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: lscpu: add CPU max MHz to test results
Sami Kerola [Tue, 10 Sep 2013 19:51:13 +0000 (20:51 +0100)] 
tests: lscpu: add CPU max MHz to test results

Commit 44320710bdb98a3036e8297d0e0af043fb72d702 changed default output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoagetty: add baud rates available from glibc that are not already supported
James Buren [Tue, 3 Sep 2013 08:01:42 +0000 (03:01 -0500)] 
agetty: add baud rates available from glibc that are not already supported

This adds userspace support for baud rates reater than 230400, provided the tty
also supports it.

11 years agoagetty: only use EXTA/EXTB macros if B19200/B38400 macros are not present
James Buren [Tue, 3 Sep 2013 07:50:57 +0000 (02:50 -0500)] 
agetty: only use EXTA/EXTB macros if B19200/B38400 macros are not present

11 years agolibblkid: export info about bad csum
Karel Zak [Wed, 11 Sep 2013 15:42:48 +0000 (17:42 +0200)] 
libblkid: export info about bad csum

If a bad check sum is detected and BLKID_SUBLKS_BADCSUM is enabled
than SBBADCSUM=1 is added to the probing result.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: add bcache images
Karel Zak [Wed, 11 Sep 2013 15:16:18 +0000 (17:16 +0200)] 
tests: add bcache images

 images generated by Rolf Fokkens <rolf@rolffokkens.nl>

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: Add bcache support
Rolf Fokkens [Fri, 6 Sep 2013 10:58:45 +0000 (12:58 +0200)] 
libblkid: Add bcache support

From https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c11

[kzak@redhat.com: - move crc64 code to lib/ by separate patch,
                  - use BLKID_USAGE_OTHER rather than _RAID]

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib: add crc64()
Karel Zak [Wed, 11 Sep 2013 12:37:22 +0000 (14:37 +0200)] 
lib: add crc64()

Based on bcache code from Rolf Fokkens.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agowipefs: Also wipe superblocks with bad checksums
Gabriel de Perthuis [Fri, 6 Sep 2013 17:18:15 +0000 (19:18 +0200)] 
wipefs: Also wipe superblocks with bad checksums

[kzak@redhat.com: - move BLKID_SUBLKS_BADCSUM login to
                    blkid_probe_verify_csum()]

Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: use separate function to verify checksums
Karel Zak [Wed, 11 Sep 2013 11:19:44 +0000 (13:19 +0200)] 
libblkid: use separate function to verify checksums

 * consolidate "incorrect checksum" debug messages
 * verify all on one place

Based on patch from Gabriel de Perthuis <g2p.code@gmail.com>

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: use stable MBR ID
Karel Zak [Wed, 11 Sep 2013 14:21:16 +0000 (16:21 +0200)] 
tests: use stable MBR ID

Signed-off-by: Karel Zak <kzak@redhat.com>