Imported from util-linux-2.13-pre6 tarball.
This commit is contained in:
parent
19922f22a1
commit
cf6d7faebb
|
@ -237,7 +237,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
SUBDIRS = lib \
|
||||
disk-utils \
|
||||
|
|
7
NEWS
7
NEWS
|
@ -1,3 +1,10 @@
|
|||
util-linux 2.13-pre6
|
||||
|
||||
* getopt: updated to 1.1.4
|
||||
* replaced all *llseek variants with lseek
|
||||
* misc build system, code and docs cleanups and fixes
|
||||
* updated translations: fr, it
|
||||
|
||||
util-linux 2.13-pre5
|
||||
|
||||
* {fsck,mkfs}.cramfs: updated to cramfs-1.1
|
||||
|
|
|
@ -4,7 +4,7 @@ datadir = $(prefix)/usr/share
|
|||
infodir = $(datadir)/info
|
||||
mandir = $(datadir)/man
|
||||
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
|
||||
DEFAULT_INCLUDES =
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for util-linux 2.13-pre5.
|
||||
# Generated by GNU Autoconf 2.59 for util-linux 2.13-pre6.
|
||||
#
|
||||
# Report bugs to <bunk@stusta.de>.
|
||||
#
|
||||
|
@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
|
|||
# Identity of this package.
|
||||
PACKAGE_NAME='util-linux'
|
||||
PACKAGE_TARNAME='util-linux'
|
||||
PACKAGE_VERSION='2.13-pre5'
|
||||
PACKAGE_STRING='util-linux 2.13-pre5'
|
||||
PACKAGE_VERSION='2.13-pre6'
|
||||
PACKAGE_STRING='util-linux 2.13-pre6'
|
||||
PACKAGE_BUGREPORT='bunk@stusta.de'
|
||||
|
||||
ac_unique_file="mount/mount.c"
|
||||
|
@ -781,7 +781,7 @@ if test "$ac_init_help" = "long"; then
|
|||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures util-linux 2.13-pre5 to adapt to many kinds of systems.
|
||||
\`configure' configures util-linux 2.13-pre6 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
|
@ -847,7 +847,7 @@ fi
|
|||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of util-linux 2.13-pre5:";;
|
||||
short | recursive ) echo "Configuration of util-linux 2.13-pre6:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
|
@ -1007,7 +1007,7 @@ fi
|
|||
test -n "$ac_init_help" && exit 0
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
util-linux configure 2.13-pre5
|
||||
util-linux configure 2.13-pre6
|
||||
generated by GNU Autoconf 2.59
|
||||
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
|
@ -1021,7 +1021,7 @@ cat >&5 <<_ACEOF
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by util-linux $as_me 2.13-pre5, which was
|
||||
It was created by util-linux $as_me 2.13-pre6, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
|
@ -1668,7 +1668,7 @@ fi
|
|||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='util-linux'
|
||||
VERSION='2.13-pre5'
|
||||
VERSION='2.13-pre6'
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
@ -10985,7 +10985,7 @@ _ASBOX
|
|||
} >&5
|
||||
cat >&5 <<_CSEOF
|
||||
|
||||
This file was extended by util-linux $as_me 2.13-pre5, which was
|
||||
This file was extended by util-linux $as_me 2.13-pre6, which was
|
||||
generated by GNU Autoconf 2.59. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
|
@ -11048,7 +11048,7 @@ _ACEOF
|
|||
|
||||
cat >>$CONFIG_STATUS <<_ACEOF
|
||||
ac_cs_version="\\
|
||||
util-linux config.status 2.13-pre5
|
||||
util-linux config.status 2.13-pre6
|
||||
configured by $0, generated by GNU Autoconf 2.59,
|
||||
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
AC_INIT(util-linux, 2.13-pre5, bunk@stusta.de)
|
||||
AC_INIT(util-linux, 2.13-pre6, bunk@stusta.de)
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
man_MANS = blockdev.8 fdformat.8 isosize.8 mkfs.8 mkswap.8 \
|
||||
fsck.minix.8 mkfs.minix.8 mkfs.bfs.8 $(am__append_2) \
|
||||
|
|
|
@ -4,7 +4,7 @@ if !M68K
|
|||
|
||||
sbin_PROGRAMS = fdisk
|
||||
man_MANS = fdisk.8
|
||||
fdisk_SOURCES = fdisk.c llseek.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \
|
||||
fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \
|
||||
fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c
|
||||
|
||||
if !SPARC
|
||||
|
@ -16,13 +16,13 @@ sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c
|
|||
if USE_SLANG
|
||||
sbin_PROGRAMS += cfdisk
|
||||
man_MANS += cfdisk.8
|
||||
cfdisk_SOURCES = cfdisk.c llseek.c disksize.c i386_sys_types.c
|
||||
cfdisk_SOURCES = cfdisk.c disksize.c i386_sys_types.c
|
||||
cfdisk_LDADD = -lslang
|
||||
else
|
||||
if HAVE_NCURSES
|
||||
sbin_PROGRAMS += cfdisk
|
||||
man_MANS += cfdisk.8
|
||||
cfdisk_SOURCES = cfdisk.c llseek.c disksize.c i386_sys_types.c
|
||||
cfdisk_SOURCES = cfdisk.c disksize.c i386_sys_types.c
|
||||
cfdisk_LDADD = -lncurses
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -65,27 +65,23 @@ CONFIG_CLEAN_FILES =
|
|||
am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
|
||||
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(sbin_PROGRAMS)
|
||||
am__cfdisk_SOURCES_DIST = cfdisk.c llseek.c disksize.c \
|
||||
i386_sys_types.c
|
||||
am__cfdisk_SOURCES_DIST = cfdisk.c disksize.c i386_sys_types.c
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@am_cfdisk_OBJECTS = cfdisk.$(OBJEXT) \
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@ llseek.$(OBJEXT) \
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@ disksize.$(OBJEXT) \
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@ i386_sys_types.$(OBJEXT)
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@am_cfdisk_OBJECTS = \
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@ cfdisk.$(OBJEXT) \
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@ llseek.$(OBJEXT) \
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@ disksize.$(OBJEXT) \
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@ i386_sys_types.$(OBJEXT)
|
||||
cfdisk_OBJECTS = $(am_cfdisk_OBJECTS)
|
||||
cfdisk_DEPENDENCIES =
|
||||
am__fdisk_SOURCES_DIST = fdisk.c llseek.c disksize.c fdiskbsdlabel.c \
|
||||
am__fdisk_SOURCES_DIST = fdisk.c disksize.c fdiskbsdlabel.c \
|
||||
fdisksgilabel.c fdisksunlabel.c fdiskaixlabel.c \
|
||||
i386_sys_types.c partname.c
|
||||
@M68K_FALSE@am_fdisk_OBJECTS = fdisk.$(OBJEXT) llseek.$(OBJEXT) \
|
||||
@M68K_FALSE@ disksize.$(OBJEXT) fdiskbsdlabel.$(OBJEXT) \
|
||||
@M68K_FALSE@ fdisksgilabel.$(OBJEXT) fdisksunlabel.$(OBJEXT) \
|
||||
@M68K_FALSE@ fdiskaixlabel.$(OBJEXT) i386_sys_types.$(OBJEXT) \
|
||||
@M68K_FALSE@ partname.$(OBJEXT)
|
||||
@M68K_FALSE@am_fdisk_OBJECTS = fdisk.$(OBJEXT) disksize.$(OBJEXT) \
|
||||
@M68K_FALSE@ fdiskbsdlabel.$(OBJEXT) fdisksgilabel.$(OBJEXT) \
|
||||
@M68K_FALSE@ fdisksunlabel.$(OBJEXT) fdiskaixlabel.$(OBJEXT) \
|
||||
@M68K_FALSE@ i386_sys_types.$(OBJEXT) partname.$(OBJEXT)
|
||||
fdisk_OBJECTS = $(am_fdisk_OBJECTS)
|
||||
fdisk_LDADD = $(LDADD)
|
||||
am__sfdisk_SOURCES_DIST = sfdisk.c disksize.c i386_sys_types.c \
|
||||
|
@ -270,16 +266,16 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
@M68K_FALSE@man_MANS = fdisk.8 $(am__append_2) $(am__append_4) \
|
||||
@M68K_FALSE@ $(am__append_6)
|
||||
@M68K_FALSE@fdisk_SOURCES = fdisk.c llseek.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \
|
||||
@M68K_FALSE@fdisk_SOURCES = fdisk.c disksize.c fdiskbsdlabel.c fdisksgilabel.c \
|
||||
@M68K_FALSE@ fdisksunlabel.c fdiskaixlabel.c i386_sys_types.c partname.c
|
||||
|
||||
@M68K_FALSE@@SPARC_FALSE@sfdisk_SOURCES = sfdisk.c disksize.c i386_sys_types.c partname.c
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@cfdisk_SOURCES = cfdisk.c llseek.c disksize.c i386_sys_types.c
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_SOURCES = cfdisk.c llseek.c disksize.c i386_sys_types.c
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@cfdisk_SOURCES = cfdisk.c disksize.c i386_sys_types.c
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_SOURCES = cfdisk.c disksize.c i386_sys_types.c
|
||||
@HAVE_NCURSES_TRUE@@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_FALSE@cfdisk_LDADD = -lncurses
|
||||
@M68K_FALSE@@SPARC_FALSE@@USE_SLANG_TRUE@cfdisk_LDADD = -lslang
|
||||
all: all-am
|
||||
|
@ -362,7 +358,6 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdisksgilabel.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdisksunlabel.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386_sys_types.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llseek.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partname.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfdisk.Po@am__quote@
|
||||
|
||||
|
|
|
@ -84,9 +84,6 @@
|
|||
#include "xstrncpy.h"
|
||||
#include "common.h"
|
||||
|
||||
extern long long ext2_llseek(unsigned int fd, long long offset,
|
||||
unsigned int origin);
|
||||
|
||||
#define DEFAULT_DEVICE "/dev/hda"
|
||||
#define ALTERNATE_DEVICE "/dev/sda"
|
||||
|
||||
|
@ -550,7 +547,7 @@ die_x(int ret) {
|
|||
|
||||
static void
|
||||
read_sector(char *buffer, long long sect_num) {
|
||||
if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0)
|
||||
if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0)
|
||||
fatal(_("Cannot seek on disk drive"), 2);
|
||||
if (read(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE)
|
||||
fatal(_("Cannot read disk drive"), 2);
|
||||
|
@ -558,7 +555,7 @@ read_sector(char *buffer, long long sect_num) {
|
|||
|
||||
static void
|
||||
write_sector(char *buffer, long long sect_num) {
|
||||
if (ext2_llseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0)
|
||||
if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0)
|
||||
fatal(_("Cannot seek on disk drive"), 2);
|
||||
if (write(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE)
|
||||
fatal(_("Cannot write disk drive"), 2);
|
||||
|
@ -585,7 +582,7 @@ get_dos_label(int i) {
|
|||
long long offset;
|
||||
|
||||
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == offset
|
||||
if (lseek(fd, offset, SEEK_SET) == offset
|
||||
&& read(fd, §or, sizeof(sector)) == sizeof(sector)) {
|
||||
dos_copy_to_info(p_info[i].ostype, OSTYPESZ,
|
||||
sector+DOS_OSTYPE_OFFSET, DOS_OSTYPE_SZ);
|
||||
|
@ -670,7 +667,7 @@ get_linux_label(int i) {
|
|||
|
||||
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE
|
||||
+ 1024;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == offset
|
||||
if (lseek(fd, offset, SEEK_SET) == offset
|
||||
&& read(fd, &e2fsb, sizeof(e2fsb)) == sizeof(e2fsb)
|
||||
&& e2fsb.s_magic[0] + (e2fsb.s_magic[1]<<8) == EXT2_SUPER_MAGIC) {
|
||||
label = e2fsb.s_volume_name;
|
||||
|
@ -686,7 +683,7 @@ get_linux_label(int i) {
|
|||
}
|
||||
|
||||
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + 0;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == offset
|
||||
if (lseek(fd, offset, SEEK_SET) == offset
|
||||
&& read(fd, &xfsb, sizeof(xfsb)) == sizeof(xfsb)
|
||||
&& !strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4)) {
|
||||
label = xfsb.s_fname;
|
||||
|
@ -700,7 +697,7 @@ get_linux_label(int i) {
|
|||
/* jfs? */
|
||||
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE
|
||||
+ JFS_SUPER1_OFF;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == offset
|
||||
if (lseek(fd, offset, SEEK_SET) == offset
|
||||
&& read(fd, &jfsb, sizeof(jfsb)) == sizeof(jfsb)
|
||||
&& !strncmp(jfsb.s_magic, JFS_MAGIC, strlen(JFS_MAGIC))) {
|
||||
label = jfsb.s_label;
|
||||
|
@ -714,7 +711,7 @@ get_linux_label(int i) {
|
|||
/* reiserfs? */
|
||||
offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE
|
||||
+ REISERFS_DISK_OFFSET_IN_BYTES;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == offset
|
||||
if (lseek(fd, offset, SEEK_SET) == offset
|
||||
&& read(fd, &reiserfsb, sizeof(reiserfsb)) == sizeof(reiserfsb)
|
||||
&& has_reiserfs_magic_string(&reiserfsb, &reiserfs_is_3_6)) {
|
||||
if (reiserfs_is_3_6) {
|
||||
|
@ -1858,7 +1855,7 @@ write_part_table(void) {
|
|||
|
||||
while (!done) {
|
||||
mvaddstr(COMMAND_LINE_Y, COMMAND_LINE_X,
|
||||
_("Are you sure you want write the partition table "
|
||||
_("Are you sure you want to write the partition table "
|
||||
"to disk? (yes or no): "));
|
||||
len = get_string(response, LINE_LENGTH, NULL);
|
||||
clear_warning();
|
||||
|
|
|
@ -241,8 +241,8 @@ void fatal(enum failure why) {
|
|||
|
||||
static void
|
||||
seek_sector(int fd, unsigned int secno) {
|
||||
long long offset = (long long) secno * sector_size;
|
||||
if (ext2_llseek(fd, offset, SEEK_SET) == (long long) -1)
|
||||
off_t offset = (off_t) secno * sector_size;
|
||||
if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
||||
fatal(unable_to_seek);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
#define cround(n) (display_in_cyl_units ? ((n)/units_per_sector)+1 : (n))
|
||||
#define scround(x) (((x)+units_per_sector-1)/units_per_sector)
|
||||
|
||||
extern long long ext2_llseek(unsigned int fd, long long offset,
|
||||
unsigned int origin);
|
||||
|
||||
#if defined(__GNUC__) && (defined(__arm__) || defined(__alpha__))
|
||||
# define PACKED __attribute__ ((packed))
|
||||
#else
|
||||
|
|
|
@ -566,7 +566,7 @@ xbsd_write_bootstrap (void)
|
|||
sector = get_start_sect(xbsd_part);
|
||||
#endif
|
||||
|
||||
if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1)
|
||||
if (lseek (fd, (off_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
|
||||
fatal (unable_to_seek);
|
||||
if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE))
|
||||
fatal (unable_to_write);
|
||||
|
@ -735,7 +735,7 @@ xbsd_readlabel (struct partition *p, struct xbsd_disklabel *d)
|
|||
sector = 0;
|
||||
#endif
|
||||
|
||||
if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE, SEEK_SET) == -1)
|
||||
if (lseek (fd, (off_t) sector * SECTOR_SIZE, SEEK_SET) == -1)
|
||||
fatal (unable_to_seek);
|
||||
if (BSD_BBSIZE != read (fd, disklabelbuffer, BSD_BBSIZE))
|
||||
fatal (unable_to_read);
|
||||
|
@ -781,12 +781,12 @@ xbsd_writelabel (struct partition *p, struct xbsd_disklabel *d)
|
|||
|
||||
#if defined (__alpha__) && BSD_LABELSECTOR == 0
|
||||
alpha_bootblock_checksum (disklabelbuffer);
|
||||
if (ext2_llseek (fd, (long long) 0, SEEK_SET) == -1)
|
||||
if (lseek (fd, (off_t) 0, SEEK_SET) == -1)
|
||||
fatal (unable_to_seek);
|
||||
if (BSD_BBSIZE != write (fd, disklabelbuffer, BSD_BBSIZE))
|
||||
fatal (unable_to_write);
|
||||
#else
|
||||
if (ext2_llseek (fd, (long long) sector * SECTOR_SIZE + BSD_LABELOFFSET,
|
||||
if (lseek (fd, (off_t) sector * SECTOR_SIZE + BSD_LABELOFFSET,
|
||||
SEEK_SET) == -1)
|
||||
fatal (unable_to_seek);
|
||||
if (sizeof (struct xbsd_disklabel) != write (fd, d, sizeof (struct xbsd_disklabel)))
|
||||
|
|
|
@ -379,7 +379,7 @@ sgi_write_table(void) {
|
|||
*/
|
||||
sgiinfo *info = fill_sgiinfo();
|
||||
int infostartblock = SSWAP32(sgilabel->directory[0].vol_file_start);
|
||||
if (ext2_llseek(fd, (long long)infostartblock*
|
||||
if (lseek(fd, (off_t) infostartblock*
|
||||
SECTOR_SIZE, SEEK_SET) < 0)
|
||||
fatal(unable_to_seek);
|
||||
if (write(fd, info, SECTOR_SIZE) != SECTOR_SIZE)
|
||||
|
|
110
fdisk/llseek.c
110
fdisk/llseek.c
|
@ -1,110 +0,0 @@
|
|||
/*
|
||||
* llseek.c -- stub calling the llseek system call
|
||||
*
|
||||
* Copyright (C) 1994 Remy Card. This file may be redistributed
|
||||
* under the terms of the GNU Public License.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern long long ext2_llseek (unsigned int, long long, unsigned int);
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#ifdef HAVE_LLSEEK
|
||||
#include <syscall.h>
|
||||
|
||||
#else /* HAVE_LLSEEK */
|
||||
|
||||
#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
|
||||
|
||||
#define my_llseek lseek
|
||||
|
||||
#else
|
||||
#include <linux/unistd.h> /* for __NR__llseek */
|
||||
|
||||
static int _llseek (unsigned int, unsigned long,
|
||||
unsigned long, long long *, unsigned int);
|
||||
|
||||
#ifdef __NR__llseek
|
||||
|
||||
static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
|
||||
unsigned long, offset_low,long long *,result,
|
||||
unsigned int, origin)
|
||||
|
||||
#else
|
||||
|
||||
/* no __NR__llseek on compilation machine - might give it explicitly */
|
||||
static int _llseek (unsigned int fd, unsigned long oh,
|
||||
unsigned long ol, long long *result,
|
||||
unsigned int origin) {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static long long my_llseek (unsigned int fd, long long offset,
|
||||
unsigned int origin)
|
||||
{
|
||||
long long result;
|
||||
int retval;
|
||||
|
||||
retval = _llseek (fd, ((unsigned long long) offset) >> 32,
|
||||
((unsigned long long) offset) & 0xffffffff,
|
||||
&result, origin);
|
||||
return (retval == -1 ? (long long) retval : result);
|
||||
}
|
||||
|
||||
#endif /* __alpha__ */
|
||||
|
||||
#endif /* HAVE_LLSEEK */
|
||||
|
||||
long long ext2_llseek (unsigned int fd, long long offset,
|
||||
unsigned int origin)
|
||||
{
|
||||
long long result;
|
||||
static int do_compat = 0;
|
||||
|
||||
if (!do_compat) {
|
||||
result = my_llseek (fd, offset, origin);
|
||||
if (!(result == -1 && errno == ENOSYS))
|
||||
return result;
|
||||
|
||||
/*
|
||||
* Just in case this code runs on top of an old kernel
|
||||
* which does not support the llseek system call
|
||||
*/
|
||||
do_compat = 1;
|
||||
/*
|
||||
* Now try ordinary lseek.
|
||||
*/
|
||||
}
|
||||
|
||||
if ((sizeof(off_t) >= sizeof(long long)) ||
|
||||
(offset < ((long long) 1 << ((sizeof(off_t)*8) -1))))
|
||||
return lseek(fd, (off_t) offset, origin);
|
||||
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
#else /* !linux */
|
||||
|
||||
long long ext2_llseek (unsigned int fd, long long offset,
|
||||
unsigned int origin)
|
||||
{
|
||||
if ((sizeof(off_t) < sizeof(long long)) &&
|
||||
(offset >= ((long long) 1 << ((sizeof(off_t)*8) -1)))) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
return lseek (fd, (off_t) offset, origin);
|
||||
}
|
||||
|
||||
#endif /* linux */
|
||||
|
||||
|
|
@ -162,36 +162,17 @@ fatal(char *s, ...) {
|
|||
/*
|
||||
* sseek: seek to specified sector - return 0 on failure
|
||||
*
|
||||
* For >4GB disks lseek needs a > 32bit arg, and we have to use llseek.
|
||||
* On the other hand, a 32 bit sector number is OK until 2TB.
|
||||
* The routines _llseek and sseek below are the only ones that
|
||||
* know about the loff_t type.
|
||||
*
|
||||
* Note: we use 512-byte sectors here, irrespective of the hardware ss.
|
||||
*/
|
||||
#undef use_lseek
|
||||
#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) || defined (__s390x__)
|
||||
#define use_lseek
|
||||
#endif
|
||||
|
||||
#ifndef use_lseek
|
||||
static __attribute__used
|
||||
_syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
|
||||
loff_t *, res, unsigned int, wh);
|
||||
#endif
|
||||
|
||||
static int
|
||||
sseek(char *dev, unsigned int fd, unsigned long s) {
|
||||
loff_t in, out;
|
||||
in = ((loff_t) s << 9);
|
||||
off_t in, out;
|
||||
in = ((off_t) s << 9);
|
||||
out = 1;
|
||||
|
||||
#ifndef use_lseek
|
||||
if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) {
|
||||
#else
|
||||
if ((out = lseek(fd, in, SEEK_SET)) != in) {
|
||||
#endif
|
||||
perror("llseek");
|
||||
perror("lseek");
|
||||
error(_("seek error on %s - cannot seek to %lu\n"), dev, s);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
20051107: Bumped up version number to 1.1.4
|
||||
20051107: Makefile: package target
|
||||
20051107: Changed email and website to current ones
|
||||
20051107: Fixed a few typos in the manpage (sync with util-linux (2.12r)
|
||||
20030123: Bumped up version number to 1.1.3
|
||||
20030123: Changed WITH_GETTEXT option to WITHOUT_GETTEXT
|
||||
20030123: Renamed example programs to have the string getopt- prepended
|
||||
|
|
|
@ -240,7 +240,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
getopt_CFLAGS = -DLIBCGETOPT=1
|
||||
man_MANS = getopt.1
|
||||
|
|
|
@ -69,12 +69,13 @@ COPYING
|
|||
|
||||
This program comes under the GNU general public licence version 2. See the
|
||||
file COPYING included in this package. Note that though you may freely
|
||||
copy it, it is copyright (c) 1997 by Frodo Looijaard <frodol@dds.nl>.
|
||||
copy it, it is copyright (c) 1997-2005 by Frodo Looijaard
|
||||
<frodo@frodo.looijaard.name>.
|
||||
Files in the gnu directory are from glibc-2.0.4: copyright (C) 1987, 88,
|
||||
89, 90, 91, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
|
||||
|
||||
|
||||
DOWNLOADING
|
||||
|
||||
You can find the latest version of this program at
|
||||
<http://huizen.dds.nl/~frodol>.
|
||||
You can find the latest version of this program at:
|
||||
http://software.frodo.looijaard.name/getopt/
|
||||
|
|
|
@ -433,7 +433,7 @@ not very intuitive (you have to set them explicitely to the empty
|
|||
string).
|
||||
|
||||
.SH AUTHOR
|
||||
Frodo Looijaard <frodol@dds.nl>
|
||||
Frodo Looijaard <frodo@frodo.looijaard.name>
|
||||
.SH "SEE ALSO"
|
||||
.BR getopt (3),
|
||||
.BR bash (1),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
getopt.c - Enhanced implementation of BSD getopt(1)
|
||||
Copyright (c) 1997, 1998, 1999, 2000 Frodo Looijaard <frodol@dds.nl>
|
||||
Copyright (c) 1997-2005 Frodo Looijaard <frodo@frodo.looijaard.name>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -35,6 +35,8 @@
|
|||
* Version 1.1.0: Tue Jun 30 2000
|
||||
* Added NLS support (partly written by Arkadiusz Mi<B6>kiewicz
|
||||
* <misiek@pld.org.pl>)
|
||||
* Version 1.1.4: Mon Nov 7 2005
|
||||
* Fixed a few type's in the manpage
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -371,7 +373,7 @@ int main(int argc, char *argv[])
|
|||
int opt;
|
||||
int compatible=0;
|
||||
|
||||
#ifdef WITHOUT_GETTEXT
|
||||
#if WITHOUT_GETTEXT
|
||||
#else
|
||||
setlocale(LC_ALL,"");
|
||||
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||
|
@ -441,7 +443,7 @@ int main(int argc, char *argv[])
|
|||
quote=0;
|
||||
break;
|
||||
case 'V':
|
||||
printf(_("getopt (enhanced) 1.1.3\n"));
|
||||
printf(_("getopt (enhanced) 1.1.4\n"));
|
||||
exit(0);
|
||||
case '?':
|
||||
case ':':
|
||||
|
|
|
@ -231,7 +231,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
man_MANS = hwclock.8
|
||||
hwclock_SOURCES = hwclock.c cmos.c rtc.c kd.c
|
||||
|
|
|
@ -237,7 +237,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
noinst_LIBRARIES = libmd5.a libenv.a libsetproctitle.a
|
||||
libmd5_a_SOURCES = md5.c
|
||||
|
|
|
@ -339,7 +339,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
man_MANS = $(am__append_2) $(am__append_4) $(am__append_6) \
|
||||
$(am__append_10) $(am__append_24) $(am__append_26)
|
||||
|
|
|
@ -290,7 +290,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
mcookie_LDADD = $(top_srcdir)/lib/libmd5.a
|
||||
usrbinexec_SCRIPTS = chkdupexe scriptreplay $(am__append_7)
|
||||
|
|
|
@ -267,8 +267,8 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include \
|
||||
-DHAVE_NFS
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h \
|
||||
-I$(top_srcdir)/include -DHAVE_NFS
|
||||
DEFAULT_INCLUDES =
|
||||
man_MANS = fstab.5 nfs.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 \
|
||||
$(am__append_4)
|
||||
|
|
|
@ -817,20 +817,6 @@ Filesystem 1024-blocks Used Available Capacity Mounted on
|
|||
to the options given in
|
||||
.IR /etc/fstab .)
|
||||
|
||||
.TP
|
||||
.\" Before Linux 2.3.99-pre3:
|
||||
.\" .BR check " / " check=normal " / " check=strict
|
||||
.\" Set checking level. When at least one of these options is set (and
|
||||
.\" .B check=normal
|
||||
.\" is set by default) the inodes and blocks bitmaps are checked upon mount
|
||||
.\" (which can take half a minute or so on a big disk, and is rather useless).
|
||||
.\" With strict checking, block deallocation checks that the block to free
|
||||
.\" is in the data zone.
|
||||
.\" Since 2.3.99-pre3 but before 2.6.0-test7 every string check=foo
|
||||
.\" was equivalent to just check. Since 2.6.0-test7 only check is accepted.
|
||||
.BR check
|
||||
Check filesystem (block and inode bitmaps) at mount time.
|
||||
.\" requires CONFIG_EXT2_CHECK
|
||||
.TP
|
||||
.BR check=none " / " nocheck
|
||||
No checking is done at mount time. This is the default. This is fast.
|
||||
|
|
|
@ -239,7 +239,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
@BUILD_PARTX_TRUE@partx_SOURCES = bsd.c dos.c partx.c solaris.c unixware.c gpt.c crc32.c
|
||||
all: all-am
|
||||
|
|
|
@ -333,34 +333,15 @@ xmalloc (size_t size) {
|
|||
return t;
|
||||
}
|
||||
|
||||
/*
|
||||
* sseek: seek to specified sector
|
||||
*/
|
||||
#if !defined (__alpha__) && !defined (__ia64__) && !defined (__s390x__) && !defined(__x86_64__)
|
||||
#define NEED__llseek
|
||||
#endif
|
||||
|
||||
#ifdef NEED__llseek
|
||||
#include <linux/unistd.h> /* _syscall */
|
||||
static
|
||||
_syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
|
||||
long long *, res, uint, wh);
|
||||
#endif
|
||||
|
||||
static int
|
||||
sseek(int fd, unsigned int secnr) {
|
||||
long long in, out;
|
||||
in = ((long long) secnr << 9);
|
||||
out = 1;
|
||||
|
||||
#ifdef NEED__llseek
|
||||
if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0
|
||||
|| out != in)
|
||||
#else
|
||||
if ((out = lseek(fd, in, SEEK_SET)) != in)
|
||||
#endif
|
||||
{
|
||||
fprintf(stderr, "llseek error\n");
|
||||
fprintf(stderr, "lseek error\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -18,7 +18,6 @@ fdisk/fdisk.c
|
|||
fdisk/fdisksgilabel.c
|
||||
fdisk/fdisksunlabel.c
|
||||
fdisk/i386_sys_types.c
|
||||
fdisk/llseek.c
|
||||
fdisk/partitiontype.c
|
||||
fdisk/partname.c
|
||||
fdisk/sfdisk.c
|
||||
|
|
|
@ -237,7 +237,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
@BUILD_SCHEDUTILS_TRUE@man_MANS = chrt.1 ionice.1 taskset.1
|
||||
all: all-am
|
||||
|
|
|
@ -291,7 +291,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
man_MANS = flock.1 readprofile.1 ctrlaltdel.8 cytune.8 dmesg.8 ipcrm.8 \
|
||||
ipcs.8 renice.8 setsid.8 tunelp.8 $(am__append_2)
|
||||
|
|
|
@ -274,7 +274,7 @@ sysconfdir = @sysconfdir@
|
|||
target_alias = @target_alias@
|
||||
usrbinexecdir = $(prefix)/usr/bin
|
||||
usrsbinexecdir = $(prefix)/usr/sbin
|
||||
AM_CPPFLAGS = -include $(top_srcdir)/config.h -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
|
||||
DEFAULT_INCLUDES =
|
||||
hexdump_SOURCES = hexdump.c conv.c display.c hexsyntax.c odsyntax.c parse.c
|
||||
man_MANS = col.1 colcrt.1 colrm.1 column.1 hexdump.1 rev.1 line.1 \
|
||||
|
|
Loading…
Reference in New Issue