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

systemd
Last change on this file since a4a0c7f 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
RevLine 
[69cde8d]1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2005-11-20
3Initial Package Version: 1.0.1
4Origin: Gentoo and Debian
5Upstream Status: Applied
6Description: Fixes Build issues with Dvhtool
7 Adds support for LVM and Linux Partitions
8
9diff -Naur dvhtool-1.0.1.orig/Makefile.in dvhtool-1.0.1/Makefile.in
10--- dvhtool-1.0.1.orig/Makefile.in 2001-04-17 18:07:24.000000000 +0000
11+++ dvhtool-1.0.1/Makefile.in 2005-11-21 03:17:54.000000000 +0000
12@@ -1,4 +1,4 @@
13-# Makefile.in generated automatically by automake 1.4a from Makefile.am
14+# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
15
16 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
17 # This Makefile.in is free software; the Free Software Foundation
18@@ -46,10 +46,9 @@
19 AUTOHEADER = @AUTOHEADER@
20
21 INSTALL = @INSTALL@
22-INSTALL_PROGRAM = @INSTALL_PROGRAM@
23+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
24 INSTALL_DATA = @INSTALL_DATA@
25 INSTALL_SCRIPT = @INSTALL_SCRIPT@
26-INSTALL_STRIP_FLAG =
27 transform = @program_transform_name@
28
29 NORMAL_INSTALL = :
30@@ -104,7 +103,7 @@
31
32 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
33
34-TAR = gtar
35+TAR = tar
36 GZIP_ENV = --best
37 DEP_FILES = .deps/dvhlib.P .deps/dvhtool.P .deps/getopt.P \
38 .deps/getopt1.P .deps/pread.P
39@@ -124,7 +123,7 @@
40 $(ACLOCAL_M4): configure.in acinclude.m4
41 cd $(srcdir) && $(ACLOCAL)
42
43-config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
44+config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
45 $(SHELL) ./config.status --recheck
46 $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
47 cd $(srcdir) && $(AUTOCONF)
48@@ -173,8 +172,8 @@
49 $(mkinstalldirs) $(DESTDIR)$(sbindir)
50 @list='$(sbin_PROGRAMS)'; for p in $$list; do \
51 if test -f $$p; then \
52- echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
53- $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
54+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
55+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
56 else :; fi; \
57 done
58
59@@ -382,7 +381,7 @@
60 all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) config.h
61 all-redirect: all-am
62 install-strip:
63- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
64+ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
65 installdirs:
66 $(mkinstalldirs) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir)/man8
67
68diff -Naur dvhtool-1.0.1.orig/aclocal.m4 dvhtool-1.0.1/aclocal.m4
69--- dvhtool-1.0.1.orig/aclocal.m4 2000-11-07 00:05:27.000000000 +0000
70+++ dvhtool-1.0.1/aclocal.m4 2005-11-21 03:17:54.000000000 +0000
71@@ -1,4 +1,4 @@
72-dnl aclocal.m4 generated automatically by aclocal 1.4a
73+dnl aclocal.m4 generated automatically by aclocal 1.4-p4
74
75 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
76 dnl This file is free software; the Free Software Foundation
77@@ -51,8 +51,6 @@
78
79 AC_DEFUN(AM_INIT_AUTOMAKE,
80 [AC_REQUIRE([AC_PROG_INSTALL])
81-dnl We require 2.13 because we rely on SHELL being computed by configure.
82-AC_PREREQ([2.13])
83 PACKAGE=[$1]
84 AC_SUBST(PACKAGE)
85 VERSION=[$2]
86diff -Naur dvhtool-1.0.1.orig/dvh.h dvhtool-1.0.1/dvh.h
87--- dvhtool-1.0.1.orig/dvh.h 2001-02-22 02:29:45.000000000 +0000
88+++ dvhtool-1.0.1/dvh.h 2005-11-21 03:18:42.000000000 +0000
89@@ -127,6 +127,10 @@
90 #define PTYPE_XFSLOG 11 /* partition is sgi XFS log */
91 #define PTYPE_XLV 12 /* partition is part of an XLV vol */
92 #define PTYPE_XVM 13 /* partition is sgi XVM */
93+#define PTYPE_LSWAP 0x82 /* partition is Linux swap */
94+#define PTYPE_LINUX 0x83 /* partition is Linux native */
95+#define PTYPE_LLVM 0x8e /* partition is Linux LVM */
96+#define PTYPE_LRAID 0xfd /* partition is Linux RAID */
97 #define NPTYPES 16
98
99 #define VHMAGIC 0xbe5a941 /* randomly chosen value */
100diff -Naur dvhtool-1.0.1.orig/dvhlib.c dvhtool-1.0.1/dvhlib.c
101--- dvhtool-1.0.1.orig/dvhlib.c 2001-02-24 10:37:37.000000000 +0000
102+++ dvhtool-1.0.1/dvhlib.c 2005-11-21 03:18:42.000000000 +0000
103@@ -50,6 +50,10 @@
104 case PTYPE_XFSLOG: return "XFS Log";
105 case PTYPE_XLV: return "XLV Volume";
106 case PTYPE_XVM: return "XVM Volume";
107+ case PTYPE_LSWAP: return "Linux Swap";
108+ case PTYPE_LINUX: return "Linux Native";
109+ case PTYPE_LLVM: return "Linux LVM";
110+ case PTYPE_LRAID: return "Linux RAID";
111 }
112 return "Unknown Partition Type";
113 }
114@@ -325,8 +329,10 @@
115 if (res == -1)
116 die("Couldn't stat source file");
117
118- /* XXX pad to blocksize? */
119- size = vh->vh_pt[8].pt_nblks * blksize - istat.st_size;
120+ /* calculate free blocks in vh */
121+ size = vh->vh_pt[8].pt_nblks /* total vh size */
122+ - ( vh->vh_pt[8].pt_firstlbn + 4 ) /* reserved area */
123+ - (( istat.st_size + blksize - 1 ) / blksize ); /* pad to blocksize */
124 /*
125 * Are we replacing an existing file, check for enough space and free
126 * entry in volume header
127@@ -336,16 +342,15 @@
128 /* It's an existing file, delete it. */
129 memset(vd->vd_name, 0, VDNAMESIZE);
130 vd->vd_nbytes = 0;
131- break;
132 }
133 if ( vd->vd_nbytes ) {
134- size -= vd->vd_nbytes;
135+ size -= (vd->vd_nbytes + blksize - 1 ) / blksize; /* pad to blocksize */
136 num++;
137 }
138 vd++;
139 }
140
141- if ( num == NVDIR )
142+ if ( num == NVDIR )
143 die("No more free entries in volume header");
144 if ( size <= 0 )
145 die("Not enough space left in volume header");
146@@ -403,7 +408,7 @@
147 die("Short write");
148 }
149 }
150- dest += (vd->vd_nbytes + 511) / 512; /* XXX Blocksize */
151+ dest += (vd->vd_nbytes + blksize - 1) / blksize;
152 vd++;
153 }
154
155diff -Naur dvhtool-1.0.1.orig/dvhtool.8 dvhtool-1.0.1/dvhtool.8
156--- dvhtool-1.0.1.orig/dvhtool.8 2001-02-24 10:37:37.000000000 +0000
157+++ dvhtool-1.0.1/dvhtool.8 2005-11-21 03:17:54.000000000 +0000
158@@ -1,4 +1,4 @@
159-.TH DVHTOOL 1 "July 2000"
160+.TH DVHTOOL 8 "July 2000"
161 .UC 4
162 .SH NAME
163 dvhtool \- Disk volume header manipulation tool
164@@ -85,4 +85,4 @@
165 .PP
166 .I dvhtool
167 was written by Ralf Baechle <ralf@oss.sgi.com>, Keith M. Wesolowski <wesolows@foobazco.org>,
168-Tor Arntsen <tor@spacetec.no>, Guido Guenther <guido.guenther@gmx.net>.
169+Tor Arntsen <tor@spacetec.no>, Guido Guenther <agx@debian.org>.
Note: See TracBrowser for help on using the repository browser.