source: patches/dvhtool-1.0.1-fixes-1.patch@ 6cb444f

clfs-3.0.0-sysvinit sysvinit
Last change on this file since 6cb444f was 69cde8d, checked in by Jim Gifford <clfs@…>, 19 years ago

Added: All patches needed for the book.

  • Property mode set to 100644
File size: 6.2 KB
  • dvhtool-1.0.1

    Submitted By: Jim Gifford (patches at jg555 dot com)
    Date: 2005-11-20
    Initial Package Version: 1.0.1
    Origin: Gentoo and Debian
    Upstream Status: Applied
    Description: Fixes Build issues with Dvhtool
                 Adds support for LVM and Linux Partitions
     
    diff -Naur dvhtool-1.0.1.orig/Makefile.in dvhtool-1.0.1/Makefile.in
    old new  
    1 # Makefile.in generated automatically by automake 1.4a from Makefile.am
     1# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
    22
    33# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
    44# This Makefile.in is free software; the Free Software Foundation
     
    4646AUTOHEADER = @AUTOHEADER@
    4747
    4848INSTALL = @INSTALL@
    49 INSTALL_PROGRAM = @INSTALL_PROGRAM@
     49INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
    5050INSTALL_DATA = @INSTALL_DATA@
    5151INSTALL_SCRIPT = @INSTALL_SCRIPT@
    52 INSTALL_STRIP_FLAG =
    5352transform = @program_transform_name@
    5453
    5554NORMAL_INSTALL = :
     
    104103
    105104DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
    106105
    107 TAR = gtar
     106TAR = tar
    108107GZIP_ENV = --best
    109108DEP_FILES =  .deps/dvhlib.P .deps/dvhtool.P .deps/getopt.P \
    110109.deps/getopt1.P .deps/pread.P
     
    124123$(ACLOCAL_M4):  configure.in  acinclude.m4
    125124        cd $(srcdir) && $(ACLOCAL)
    126125
    127 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
     126config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
    128127        $(SHELL) ./config.status --recheck
    129128$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
    130129        cd $(srcdir) && $(AUTOCONF)
     
    173172        $(mkinstalldirs) $(DESTDIR)$(sbindir)
    174173        @list='$(sbin_PROGRAMS)'; for p in $$list; do \
    175174          if test -f $$p; then \
    176             echo "  $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
    177              $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
     175            echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
     176             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
    178177          else :; fi; \
    179178        done
    180179
     
    382381all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h
    383382all-redirect: all-am
    384383install-strip:
    385         $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
     384        $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
    386385installdirs:
    387386        $(mkinstalldirs)  $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
    388387
  • dvhtool-1.0.1

    diff -Naur dvhtool-1.0.1.orig/aclocal.m4 dvhtool-1.0.1/aclocal.m4
    old new  
    1 dnl aclocal.m4 generated automatically by aclocal 1.4a
     1dnl aclocal.m4 generated automatically by aclocal 1.4-p4
    22
    33dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
    44dnl This file is free software; the Free Software Foundation
     
    5151
    5252AC_DEFUN(AM_INIT_AUTOMAKE,
    5353[AC_REQUIRE([AC_PROG_INSTALL])
    54 dnl We require 2.13 because we rely on SHELL being computed by configure.
    55 AC_PREREQ([2.13])
    5654PACKAGE=[$1]
    5755AC_SUBST(PACKAGE)
    5856VERSION=[$2]
  • dvhtool-1.0.1

    diff -Naur dvhtool-1.0.1.orig/dvh.h dvhtool-1.0.1/dvh.h
    old new  
    127127#define PTYPE_XFSLOG    11              /* partition is sgi XFS log */
    128128#define PTYPE_XLV       12              /* partition is part of an XLV vol */
    129129#define PTYPE_XVM       13              /* partition is sgi XVM */
     130#define PTYPE_LSWAP     0x82            /* partition is Linux swap */
     131#define PTYPE_LINUX     0x83            /* partition is Linux native */
     132#define PTYPE_LLVM      0x8e            /* partition is Linux LVM */
     133#define PTYPE_LRAID     0xfd            /* partition is Linux RAID */
    130134#define NPTYPES         16
    131135
    132136#define VHMAGIC         0xbe5a941       /* randomly chosen value */
  • dvhtool-1.0.1

    diff -Naur dvhtool-1.0.1.orig/dvhlib.c dvhtool-1.0.1/dvhlib.c
    old new  
    5050        case PTYPE_XFSLOG:      return "XFS Log";
    5151        case PTYPE_XLV:         return "XLV Volume";
    5252        case PTYPE_XVM:         return "XVM Volume";
     53        case PTYPE_LSWAP:       return "Linux Swap";
     54        case PTYPE_LINUX:       return "Linux Native";
     55        case PTYPE_LLVM:        return "Linux LVM";
     56        case PTYPE_LRAID:       return "Linux RAID";
    5357        }
    5458        return "Unknown Partition Type";
    5559}
     
    325329        if (res == -1)
    326330                die("Couldn't stat source file");
    327331
    328         /* XXX pad to blocksize? */
    329         size = vh->vh_pt[8].pt_nblks * blksize - istat.st_size;
     332        /* calculate free blocks in vh */
     333        size = vh->vh_pt[8].pt_nblks                            /* total vh size */
     334                - ( vh->vh_pt[8].pt_firstlbn + 4 )              /* reserved area */
     335                - (( istat.st_size + blksize - 1 ) / blksize ); /* pad to blocksize */
    330336        /*
    331337         * Are we replacing an existing file, check for enough space and free
    332338         * entry in volume header
     
    336342                        /* It's an existing file, delete it.  */
    337343                        memset(vd->vd_name, 0, VDNAMESIZE);
    338344                        vd->vd_nbytes = 0;
    339                         break;
    340345                }
    341346                if ( vd->vd_nbytes ) {
    342                         size -= vd->vd_nbytes;
     347                        size -= (vd->vd_nbytes + blksize - 1 ) / blksize; /* pad to blocksize */
    343348                        num++;
    344349                }
    345350                vd++;
    346351        }
    347352
    348         if ( num == NVDIR ) 
     353        if ( num == NVDIR )
    349354                die("No more free entries in volume header");
    350355        if ( size <= 0 )
    351356                die("Not enough space left in volume header");
     
    403408                                die("Short write");
    404409                        }
    405410                }
    406                 dest += (vd->vd_nbytes + 511) / 512;    /* XXX Blocksize  */
     411                dest += (vd->vd_nbytes + blksize - 1) / blksize;
    407412                vd++;
    408413        }
    409414
  • dvhtool-1.0.1

    diff -Naur dvhtool-1.0.1.orig/dvhtool.8 dvhtool-1.0.1/dvhtool.8
    old new  
    1 .TH DVHTOOL 1 "July 2000"
     1.TH DVHTOOL 8 "July 2000"
    22.UC 4
    33.SH NAME
    44dvhtool \- Disk volume header manipulation tool
     
    8585.PP
    8686.I dvhtool
    8787was written by Ralf Baechle <ralf@oss.sgi.com>, Keith M. Wesolowski <wesolows@foobazco.org>,
    88 Tor Arntsen <tor@spacetec.no>, Guido Guenther <guido.guenther@gmx.net>.
     88Tor Arntsen <tor@spacetec.no>, Guido Guenther <agx@debian.org>.
Note: See TracBrowser for help on using the repository browser.