Commit Graph

52 Commits

Author SHA1 Message Date
Karel Zak 541e6934e1 cfdisk: fix --with-slang
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-07-01 10:56:41 +02:00
Karel Zak 807418986e cfdisk: fix warning: implicit declaration of function ‘wcwidth’
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-06-21 10:01:26 +02:00
Karel Zak 5f94ca33cf cfdisk: support non-ascii characters in input
On Sat, Apr 03, 2010 at 12:58:48PM +0000, Jorge wrote:
> When you want to write changes to disk you're asked for a
> confirmation, like this one:
>
>   Are you sure you want to write the partition table to disk? (yes
>   or no)
>
> There is no problem on the English version, but when you launch the
> program in Spanish you get this:
>
>   ¿Está seguro de que desea escribir la tabla de particiones en el
> disco?
>      (sí o no):
>
> You can't type the "í" character. Trying to do so will end in no
> input at all. That is, typing in my keyboard "´" then "i" leads to
> nothing. So you can't write changes to disk, and you must launch the
> program in English for it to operate.

Reported-by: Jorge <yo@jorgesuarezdelis.name>
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/205327
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-05-07 14:12:26 +02:00
Francesco Cosoleto 7929b548cc cfdisk: set '[New]' as default item on menu for non allocated space instead of '[Help]'.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-02-12 19:31:41 +01:00
Francesco Cosoleto f4bf2458f6 cfdisk: set '[Quit]' as default menu item on first run instead of '[Bootable]'.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-02-11 14:12:08 +01:00
Matthias König f609e92e49 cfdisk: use libblkid
Let cfdisk use the internal libblkid if available to get the filesystem
type and label.

[kzak@redhat.com: - remove old FS probing code from cfdisk
                  - remove "Linux" prefix for filesystem names
                  - enlarge fstype field in partition_info
                  - restrict probing area by partition size]

Signed-off-by: Matthias König <mk@phasorlab.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-22 11:37:33 +01:00
Karel Zak e90709421a fdisk: sleep-after-sync and fsync usage
It seems that sleep() after sync() is unnecessary legacy. It's very
probably unnecessary since kernel 1.3.20. For example the libparted
does not to use sleep() at all.

It seems that more important is fsync() usage in fdisks. For more
details see

  http://marc.theaimsgroup.com/?l=linux-kernel&m=105545785306867&w=3
  http://marc.theaimsgroup.com/?l=linux-kernel&m=105545848607353&w=3
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369

Currently we use fsync() in fdisk only. This patch also add fsync() to
sfdisk and cfdisk.

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=276369
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=502639
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-06 11:12:43 +01:00
Jan Sarenik a88c48b409 cfdisk: more key alternatives
Signed-off-by: Jan Sarenik <jsarenik@redhat.com>
2009-09-07 12:52:17 +02:00
Daniel Mierswa c0f19ccff7 replace bcopy,bzero,index and rindex
Those 4 functions are marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008.

Replaced with memmove,memset,strchr and strrchr.

Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-08-17 11:15:59 +02:00
Chris Webb f01a2e3e2f fdisk: (and cfdisk) fix to be consistent about maximum heads
Fix fdisk and cfdisk to be consistent about maximum heads

Without this patch, fdisk allows up to 256 heads to be set via the menu, but
only up to 255 heads by command line -H. Similarly, cfdisk's -H option also
enforces heads <= 255 instead of heads <= 256.

The strange limit of 256 comes about because (heads - 1) should fit in a
single byte for legacy CHS. Geometries of 256 heads and 32 sectors are seen
in disks from other operating systems where cylinder-aligned partitions
which are also aligned to a 4MB boundary are wanted.

Signed-off-by: Chris Webb <chris@arachsys.com>
2009-05-19 14:52:06 +02:00
Karel Zak 279723e92d cfdisk: fix "cannot seek on disk drive" bug
Addresses-Debian-Bug: #511161
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-28 09:16:32 +02:00
Matthias Koenig 4b13a5a66b cfdisk: accept yes/no as fallback
Accept "yes" or "no" as fallback in case the question
has not been translated.

[kzak@redhat.com: note that rpmatch(3) looks at only the first
                  character of response, but we need have to
                  check the full yes/no string.]

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2008-11-14 00:09:23 +01:00
Vincent Deffontaines c64061c9b3 fdisk: suggest partprobe(8) and kpartx(8) when BLKRRPART failed
Signed-off-by: Vincent Deffontaines <vincent@gryzor.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Karel Zak <kzak@redhat.com>
2008-10-06 11:52:48 +02:00
Samuel Thibault 6b0054a2c6 fdisk: non-linux support (BLK* and HDIO_*)
BLK* and HDIO_* are not available on all platform. Work around this
in a few places.

[kzak@redhat.com: split the original patch to small patches]

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-07-24 00:52:52 +02:00
Samuel Thibault 8a6018f5dd cfdisk: define portable {DEFAULT,ALTERNATE}_DEVICE
Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2008-01-03 17:01:55 +01:00
Samuel Thibault 65fb3668fc fdisk: non-linux support (use standard uintxy_t instead __uxy)
- #include <linux/types.h> is turned into #include <stdint.h>, much more
   portable, and __uxy were turned into uintxy_t.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-12-03 14:03:47 +01:00
Peter Breitenlohner 80ee280003 cfdisk: display cylinders beyond 1024
There is absolutely no reason why cfdisk should not display
cylinders beyond 1024. The number of cylinders needs to be
truncated only for the CHS field.

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2007-11-26 14:10:14 +01:00
Karel Zak 810f986b42 fdisk: cleanup BLK* ioctls usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-07 19:05:31 +01:00
Benno Schulenberg 6557c51226 docs: tweak a few messages for clarity
Add a missing period, a missing space, a comma and a word for clarity,
plus a period and an uppercase letter to match surrounding messages.
Further add a missing call to gettext, and undo an unneeded linewrap.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-10-26 01:02:44 +02:00
Benno Schulenberg 14f432797f cfdisk: slightly increase the size of menu buttons
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-10-26 01:02:44 +02:00
Benno Schulenberg e9a48cde61 cfdisk: translate partition-type names when they are printed.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-10-26 01:02:44 +02:00
Karel Zak 652de88cef cfdisk: fix stupid typo in GPT checker call
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:41:48 +02:00
Karel Zak 46151e8772 sfdisk: fix "differ in signedness" compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:39:58 +02:00
Karel Zak 5dbff4c0eb fdisk: add GPT detection code
The GPT (GUID Partition Table) is unsupported by fdisk, sfdisk and
cfdisk. Unfortunately, the fdisk doesn't complain about GPT.. that's
dangerous, because user is able to blindly edit PT with unexpected
results.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-05 10:40:14 +02:00
Karel Zak 1bf100f33b cfdisk: build-sys defines HAVE_RPMATCH, not HAVE_rpmatch
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-06 11:54:39 +01:00
Karel Zak cf6d7faebb Imported from util-linux-2.13-pre6 tarball. 2006-12-07 00:27:13 +01:00
Karel Zak 9cb689775c Imported from util-linux-2.13-pre3 tarball. 2006-12-07 00:27:03 +01:00
Karel Zak baf39af15b Imported from util-linux-2.13-pre2 tarball. 2006-12-07 00:26:58 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak 9d761c85e0 Imported from util-linux-2.12r-pre1 tarball. 2006-12-07 00:26:44 +01:00
Karel Zak bf3baa9907 Imported from util-linux-2.12p tarball. 2006-12-07 00:26:33 +01:00
Karel Zak a47f2e6614 Imported from util-linux-2.12m tarball. 2006-12-07 00:26:30 +01:00
Karel Zak b22550fa15 Imported from util-linux-2.12k tarball. 2006-12-07 00:26:26 +01:00
Karel Zak d162fcb550 Imported from util-linux-2.12j tarball. 2006-12-07 00:26:24 +01:00
Karel Zak d26aa358f4 Imported from util-linux-2.12h tarball. 2006-12-07 00:26:19 +01:00
Karel Zak 2cccd0ff2b Imported from util-linux-2.12d tarball. 2006-12-07 00:26:18 +01:00
Karel Zak c129767e06 Imported from util-linux-2.12b tarball. 2006-12-07 00:26:16 +01:00
Karel Zak d03dd60840 Imported from util-linux-2.12a tarball. 2006-12-07 00:26:14 +01:00
Karel Zak df1dddf9ff Imported from util-linux-2.12 tarball. 2006-12-07 00:26:12 +01:00
Karel Zak a5a16c6853 Imported from util-linux-2.11y tarball. 2006-12-07 00:26:08 +01:00
Karel Zak 95f1bdeee4 Imported from util-linux-2.11x tarball. 2006-12-07 00:26:05 +01:00
Karel Zak 24f4bbff7f Imported from util-linux-2.11w tarball. 2006-12-07 00:26:03 +01:00
Karel Zak a2c5f3cadc Imported from util-linux-2.11r tarball. 2006-12-07 00:25:56 +01:00
Karel Zak ffc4374869 Imported from util-linux-2.11o tarball. 2006-12-07 00:25:53 +01:00
Karel Zak 612721dba8 Imported from util-linux-2.11n tarball. 2006-12-07 00:25:52 +01:00
Karel Zak e8f2641919 Imported from util-linux-2.11m tarball. 2006-12-07 00:25:49 +01:00
Karel Zak 364cda4857 Imported from util-linux-2.11f tarball. 2006-12-07 00:25:48 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak eb63b9b8f4 Imported from util-linux-2.10f tarball. 2006-12-07 00:25:41 +01:00