Commit Graph

11455 Commits

Author SHA1 Message Date
Sami Kerola 51b4b39870 fsck.minix: fix crash
disk-utils/fsck.minix.c:421:30: runtime error: index 513 out of bounds for
type 'unsigned short [512]'

Addresses: https://github.com/karelzak/util-linux/issues/373
Reported-by: Hanno Bock <hanno@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-16 14:54:41 +02:00
Karel Zak 387d515550 docs: update TODO, add mount(8) noauto,auto
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-16 13:15:11 +02:00
J William Piggott 5e8a508dc4 docs: update v2.30-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-15 11:44:02 +02:00
Karel Zak c604411fdf build-sys: release++ (v2.30-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 13:33:41 +02:00
Karel Zak 013d25c09d docs: add chmem and tailf to ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 13:33:16 +02:00
Karel Zak bb73c3ae22 docs: update v2.30-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 13:00:36 +02:00
Karel Zak f948cef99c docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 11:32:06 +02:00
Karel Zak ebe345d1ca po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 11:27:52 +02:00
Wylmer Wang 52de3f1484 po: update zh_CN.po (from translationproject.org) 2017-05-12 11:21:06 +02:00
Rafael Fontenelle 8940a488e2 po: update pt_BR.po (from translationproject.org) 2017-05-12 11:21:06 +02:00
Stéphane Aulery 54c77b0bd9 po: update fr.po (from translationproject.org) 2017-05-12 11:21:06 +02:00
Joe Hansen dc3ece6ecd po: update da.po (from translationproject.org) 2017-05-12 11:21:06 +02:00
Karel Zak 22cfe66265 lib/parse-date: don't use xalloc in lib-like code
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 11:17:02 +02:00
Karel Zak b8af37d767 build-sys: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 11:17:02 +02:00
Karel Zak f69eba1734 build-sys: add AC_STRUCT_TIMEZONE
new datetime parsing code assumes macros:

	lib/parse-date.c : HAVE_STRUCT_TM_TM_ZONE
	lib/parse-date.c : HAVE_TZNAME

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-12 11:16:56 +02:00
Karel Zak 5d217e6f15 wipefs: add note about no-act to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-11 15:54:30 +02:00
Karel Zak 84111dbae4 fdisk: fix type dialog
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-11 15:53:07 +02:00
Karel Zak ce59d8bfa5 Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6
  tests: Fix test output for low-probe-udf to contain UDF data
  Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
2017-05-11 10:59:14 +02:00
Karel Zak 03dd701585 tests: update wipe-partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-10 11:26:51 +02:00
Sami Kerola 2571d74382 docs: make column.1 example to use ascii output
In same go ease reading by having data and arguments in same order.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-10 10:53:28 +02:00
Sami Kerola 105bb8572f switch_root: use getopt_long() to parse options
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-10 10:53:28 +02:00
Sami Kerola 6c9f102f3e vipw: use getopt_long() to parse options
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-10 10:53:28 +02:00
Sami Kerola b6b5272b03 col: avoid extra newline if no input
BSD fix missed for 22 years, and all util-linux releases so far.

Backported-from: 2a15260a2a
Addresses: https://github.com/karelzak/util-linux/issues/422
Reported-by: Pavel Raiskup <praiskup@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-10 10:53:28 +02:00
Sami Kerola c6b0cbdd95 lib/mbsedit: fix typo in comment
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-10 10:53:28 +02:00
Karel Zak ddead341c5 fdisk: inform on 'p' about wiped partitions
The wipe operation is potentially dangerous. Let's inform about it
always by 'p' (list) command to make sure user knowns about it.

	Command (m for help): p
	...
	Device     Boot Start    End Sectors Size Id Type
	/dev/sdc1        2048 204799  202752  99M 83 Linux

	Filesystem/RAID signature on partition 1 will be wiped.

Addresses: https://github.com/karelzak/util-linux/issues/437
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 14:30:36 +02:00
Karel Zak 29f2e825d8 libfdisk: add fdisk_partition_has_wipe()
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 14:30:02 +02:00
Karel Zak a4aa4a6c9d fdisk: add to the man page missing option
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 13:05:26 +02:00
Karel Zak 577d1a663c lscpu: reuse the same buffer
Now we use libsmartcols for the default output and all is allocated in
the smartcols table. So, we can reuse the same buffer for all
sprintf/scanf calls.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 12:31:52 +02:00
Karel Zak 89222b17fc lscpu: make cpu_{max,min}_mhz() usage more elegant
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 12:29:24 +02:00
Mamatha Inamdar fc07d9f5ab lscpu: Read available CPUs max and min frequencies
Problem:"lscpu frequency-info" command was always reading CPU0
max and min frequencies. If CPU0 is guarded or offline then it used to
display max and min frequencies as NULL.

This patch will read overall CPU max and min frequencies.

Test Results:

Before Patch:

    #lscpu (CPU0 is guarded/offline)
    Architecture:          ppc64le
    Byte Order:            Little Endian
    CPU(s):                120
    On-line CPU(s) list:   8-127
    Thread(s) per core:    8
    Core(s) per socket:    3
    Socket(s):             4
    NUMA node(s):          4
    Model:                 2.1 (pvr 004b 0201)
    Model name:            POWER8E (raw), altivec supported
    CPU max MHz:           (null)
    CPU min MHz:           (null)
    L1d cache:             64K
    L1i cache:             32K
    L2 cache:              512K
    L3 cache:              8192K
    NUMA node0 CPU(s):     8-31
    NUMA node1 CPU(s):     32-63
    NUMA node16 CPU(s):    64-95
    NUMA node17 CPU(s):    96-127

With Patch:

    # ./lscpu
    Architecture:          ppc64le
    Byte Order:            Little Endian
    CPU(s):                120
    On-line CPU(s) list:   8-127
    Thread(s) per core:    8
    Core(s) per socket:    3
    Socket(s):             4
    NUMA node(s):          4
    Model:                 2.1 (pvr 004b 0201)
    Model name:            POWER8E (raw), altivec supported
    CPU max MHz:           4322.0000
    CPU min MHz:           2061.0000
    L1d cache:             64K
    L1i cache:             32K
    L2 cache:              512K
    L3 cache:              8192K
    NUMA node0 CPU(s):     8-31
    NUMA node1 CPU(s):     32-63
    NUMA node16 CPU(s):    64-95
    NUMA node17 CPU(s):    96-127

[kzak@redhat.com: - cpu_{max,min}_mhz() refactoring]

Signed-off-by: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 12:23:37 +02:00
Karel Zak 626aa65180 sulogin: add missing type
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-09 11:59:53 +02:00
Karel Zak b1f1fe3dff Merge branch '2017wk16' of git://github.com/kerolasa/lelux-utiliteetit
* '2017wk16' of git://github.com/kerolasa/lelux-utiliteetit:
  chfn, chsh: use readline(3) to receive user input
  findfs: use getopt_long() to parse options
  logger: make month names, login name, and tag read-only objects
  sulogin: reduce vulnerability surface
  partx: add --list-types option
  libblkid: add blkid_partitions_get_name()
  docs: try to convince open(2) O_DIRECT rather than using raw device
  blkid: add long options
  lsipc: fix options parsing and sync with man page
2017-05-09 11:58:23 +02:00
Pali Rohár 28f01f7433 tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6
This image was created by Nero Burning ROM version 6 via option CD-ROM
(UDF/ISO) with UDF version 2.01 and enabled ISO Joliet extension. Moreover
for testing purposes it has set custom Disc label (and also every other
identifier) which is different for ISO, Joiliet and UDF part. It contains
ISO/Joliet/UDF string prefix to distinguish between them.

So reading this image as basic ISO would produce different label as when
reading it as ISO with Joliet image and also different as UDF image.

Windows detects its label as "UDF Label".

Before commit ccfb5b0a1d blkid show label for
this image as "Joliet Label" and after as "UDF Label".

Note that it is not common to have such images with different label stored
in Joliet part and in UDF part. Moreover it is very hard to generate them.
2017-05-05 18:38:15 +02:00
Pali Rohár 5531320087 tests: Fix test output for low-probe-udf to contain UDF data
Label was really not changed because of fix by commit
2f2730bc77.

UUID is different due to fact that ISO image does not have UUID and
libblkid generate one from compilation date. Plus "Joliet Extension" in UDF
context does not make sense.
2017-05-05 18:38:15 +02:00
Pali Rohár ccfb5b0a1d Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
This reverts commit 8053b51c76.

Reporting meaningless ID_FS_LABEL=UDF_Volume written in that commit was
caused by reading wrong value for UDF label and it was fixed in commit
2f2730bc77.

So after this revert blkid reports for UDF filesystems label of UDF
filesystem and not label of ISO (if present) like other systems. In most
cases UDF and ISO labels are same (sometimes just one is upper case).

Commit 8053b51c76 just fixed result, not
reason why blkid reported different UDF Label as Windows. Real reason was
fixed in 2f2730bc77.
2017-05-05 18:38:15 +02:00
Karel Zak da06d42197 column: be robust on empty table
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 13:56:40 +02:00
Karel Zak cb3fdf2ae9 column: require column names for JSON
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 12:49:51 +02:00
Alexey Gladkov dc46610bf5 blkid: fix return code when display the version
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2017-05-05 12:22:09 +02:00
Karel Zak c467fdaf80 column: use libsmartcols to avoid circular dependences
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 12:13:15 +02:00
Karel Zak eebf2dd89b libsmartcols: add scols_line_is_ancestor()
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 12:12:43 +02:00
Karel Zak 60102db546 column: add note that circular dependencies are ignored
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 11:52:04 +02:00
Karel Zak 435846ef99 column: add --tree to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 11:47:46 +02:00
Karel Zak b0f00a9471 column: fix --tree id-parent loop crash
The loop is silently ignored.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-05 11:31:47 +02:00
Karel Zak f3626e039f tests: add new build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 14:33:04 +02:00
Karel Zak c4b6c832b4 testsL update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 13:36:20 +02:00
Karel Zak 8b7f00a8bb build-sys: fix lsmem dependence
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 12:00:20 +02:00
Karel Zak 960ee8e3f1 build-sys: remove column-old.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 10:40:46 +02:00
Sami Kerola e41ae45093
chfn, chsh: use readline(3) to receive user input
The readline offers editing capabilities while the user is entering the
line, unlike fgets(3) and getline(3) that were used earlier.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-02 23:22:05 +01:00
Sami Kerola 0e1fa6b63a
findfs: use getopt_long() to parse options
This change makes the findfs(8) more coherent with other commands in the
project source tree.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-02 23:22:04 +01:00
Sami Kerola c8598d8a51
logger: make month names, login name, and tag read-only objects
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-05-02 23:22:04 +01:00