~ubuntu-branches/debian/jessie/ufsutils/jessie

« back to all changes in this revision

Viewing changes to debian/patches/02_fsck.ufs.patch

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover, Robert Millan, Guillem Jover, Peter Pentchev
  • Date: 2011-05-31 03:50:05 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110531035005-wyiyk25p99ivd0k0
Tags: 8.2-1
[ Robert Millan ]
* Set ufsutils-udeb to kfreebsd-any.

[ Guillem Jover ]
* New upstream version (based on FreeBSD 8.2)
* Now using Standards-Version 3.9.2 (no changes needed).
* Switch to source format “3.0 (quilt)”.
  - Remove quilt from Build-Depends.
  - Remove patch target in debian/rules.
  - Remove now unneeded README.source.
  - Refresh all patches.
* Reorganize source code:
  - Switch from debian/upstream.sh to debian/rules get-orig-source target.
  - Switch from CVS to Subversion to retrieve the source code.
  - Use the same source layout as upstream (no more relocations),
    i.e. lib/, sbin/, sys/sys, sys/ufs.
  - Move libport/ to port/.
  - Merge libdisklabel/ into port/.
* Remove unneeded linking against libtermcap, thus removing the need for
  ncurses.
* Add an empty debian/watch file explaining that there's no packaged
  upstream releases. Suggested by Peter Pentchev.
* Update CVS to Subversion reference to upstream source code in
  debian/copyright.
* Remove unused lib variable from debian/rules.
* Use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS.
  Based on a patch by Peter Pentchev.
* Remove bogus reference to BSD license in /usr/share/common-licenses.
* Always set -I../../sys, even on GNU/kFreeBSD systems.

[ Peter Pentchev ]
* Remove duplicate section “utils” from ufsutils binary package.
* Remove XC- prefix from Package-Type.
* Honour CPPFLAGS and LDFLAGS and do not link with CFLAGS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Index: ufsutils/fsck.ufs/gjournal.c
2
 
===================================================================
3
 
--- ufsutils.orig/fsck.ufs/gjournal.c
4
 
+++ ufsutils/fsck.ufs/gjournal.c
 
1
---
 
2
 sbin/fsck_ffs/Makefile    |   27 ++++++++++++-------------
 
3
 sbin/fsck_ffs/ea.c        |    2 -
 
4
 sbin/fsck_ffs/fsck.h      |    1 
 
5
 sbin/fsck_ffs/fsck_ffs.8  |    7 ++----
 
6
 sbin/fsck_ffs/fsutil.c    |   13 ++++++++++--
 
7
 sbin/fsck_ffs/gjournal.c  |    4 +++
 
8
 sbin/fsck_ffs/inode.c     |    3 +-
 
9
 sbin/fsck_ffs/main.c      |   49 ++++++++++++++++++++++++++++++++++++++++++++--
 
10
 sbin/fsck_ffs/pass1.c     |    2 +
 
11
 sbin/fsck_ffs/setup.c     |   14 +++++++++++++
 
12
 sbin/fsck_ffs/utilities.c |    6 +++--
 
13
 11 files changed, 102 insertions(+), 26 deletions(-)
 
14
 
 
15
--- a/sbin/fsck_ffs/gjournal.c
 
16
+++ b/sbin/fsck_ffs/gjournal.c
5
17
@@ -54,6 +54,9 @@
6
18
 #include <sys/cdefs.h>
7
 
 __FBSDID("$FreeBSD: src/sbin/fsck_ffs/gjournal.c,v 1.2.8.1 2009/04/15 03:14:26 kensmith Exp $");
 
19
 __FBSDID("$FreeBSD$");
8
20
 
9
21
+
10
22
+#if HAVE_UFS_SNAPSHOT
12
24
 #include <sys/param.h>
13
25
 #include <sys/disklabel.h>
14
26
 #include <sys/mount.h>
15
 
@@ -774,3 +777,4 @@
 
27
@@ -774,3 +777,4 @@ gjournal_check(const char *filesys)
16
28
        /* Write back updated statistics and super-block. */
17
29
        putdisk();
18
30
 }
19
31
+#endif
20
 
Index: ufsutils/fsck.ufs/ea.c
21
 
===================================================================
22
 
--- ufsutils.orig/fsck.ufs/ea.c
23
 
+++ ufsutils/fsck.ufs/ea.c
24
 
@@ -38,7 +38,7 @@
 
32
--- a/sbin/fsck_ffs/ea.c
 
33
+++ b/sbin/fsck_ffs/ea.c
 
34
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
25
35
 
26
36
 #include <sys/param.h>
27
37
 #include <sys/time.h>
30
40
 
31
41
 #include <ufs/ufs/dinode.h>
32
42
 #include <ufs/ufs/dir.h>
33
 
Index: ufsutils/fsck.ufs/fsck_ffs.8
34
 
===================================================================
35
 
--- ufsutils.orig/fsck.ufs/fsck_ffs.8
36
 
+++ ufsutils/fsck.ufs/fsck_ffs.8
 
43
--- a/sbin/fsck_ffs/fsck_ffs.8
 
44
+++ b/sbin/fsck_ffs/fsck_ffs.8
37
45
@@ -30,11 +30,11 @@
38
 
 .\" $FreeBSD: src/sbin/fsck_ffs/fsck_ffs.8,v 1.34.2.5.2.2 2009/04/27 19:15:33 delphij Exp $
 
46
 .\" $FreeBSD$
39
47
 .\"
40
48
 .Dd January 25, 2009
41
49
-.Dt FSCK_FFS 8
49
57
 .Nd file system consistency check and interactive repair
50
58
 .Sh SYNOPSIS
51
59
 .Nm
52
 
@@ -341,5 +341,4 @@
 
60
@@ -349,5 +349,4 @@ are fully enumerated and explained in Ap
53
61
 .Xr fstab 5 ,
54
62
 .Xr fsck 8 ,
55
63
 .Xr fsdb 8 ,
56
64
-.Xr newfs 8 ,
57
65
 .Xr reboot 8
58
 
Index: ufsutils/fsck.ufs/fsutil.c
59
 
===================================================================
60
 
--- ufsutils.orig/fsck.ufs/fsutil.c
61
 
+++ ufsutils/fsck.ufs/fsutil.c
62
 
@@ -38,7 +38,9 @@
 
66
--- a/sbin/fsck_ffs/fsutil.c
 
67
+++ b/sbin/fsck_ffs/fsutil.c
 
68
@@ -38,7 +38,9 @@ __FBSDID("$FreeBSD$");
63
69
 #include <sys/param.h>
64
70
 #include <sys/time.h>
65
71
 #include <sys/types.h>
69
75
 #include <sys/disklabel.h>
70
76
 #include <sys/stat.h>
71
77
 #include <sys/disklabel.h>
72
 
@@ -55,6 +57,7 @@
 
78
@@ -55,6 +57,7 @@ __FBSDID("$FreeBSD$");
73
79
 #include <stdint.h>
74
80
 #include <stdio.h>
75
81
 #include <stdlib.h>
77
83
 #include <unistd.h>
78
84
 
79
85
 #include "fsck.h"
80
 
@@ -277,11 +280,13 @@
 
86
@@ -277,11 +280,13 @@ ckfini(int markclean)
81
87
        if (bkgrdflag) {
82
88
                unlink(snapname);
83
89
                if ((!(sblock.fs_flags & FS_UNCLEAN)) != markclean) {
91
97
                        if (!preen) {
92
98
                                printf("\n***** FILE SYSTEM MARKED %s *****\n",
93
99
                                    markclean ? "CLEAN" : "DIRTY");
94
 
@@ -593,7 +598,7 @@
 
100
@@ -639,7 +644,7 @@ getpathname(char *namebuf, ino_t curdir,
95
101
 }
96
102
 
97
103
 void
100
106
 {
101
107
 
102
108
        ckfini(0);
103
 
@@ -606,7 +611,7 @@
 
109
@@ -652,7 +657,7 @@ catch(int sig __unused)
104
110
  * so that reboot sequence may be interrupted.
105
111
  */
106
112
 void
109
115
 {
110
116
        printf("returning to single-user after file system check\n");
111
117
        returntosingle = 1;
112
 
@@ -675,11 +680,13 @@
 
118
@@ -721,11 +726,13 @@ pfatal(const char *fmt, ...)
113
119
                 * Force foreground fsck to clean up inconsistency.
114
120
                 */
115
121
                if (bkgrdflag) {
123
129
                        fprintf(stdout, "CANNOT RUN IN BACKGROUND\n");
124
130
                        ckfini(0);
125
131
                        exit(EEXIT);
126
 
@@ -696,6 +703,7 @@
 
132
@@ -742,6 +749,7 @@ pfatal(const char *fmt, ...)
127
133
        /*
128
134
         * Force foreground fsck to clean up inconsistency.
129
135
         */
131
137
        if (bkgrdflag) {
132
138
                cmd.value = FS_NEEDSFSCK;
133
139
                cmd.size = 1;
134
 
@@ -703,6 +711,7 @@
 
140
@@ -749,6 +757,7 @@ pfatal(const char *fmt, ...)
135
141
                    &cmd, sizeof cmd) == -1)
136
142
                        pwarn("CANNOT SET FS_NEEDSFSCK FLAG\n");
137
143
        }
139
145
        ckfini(0);
140
146
        exit(EEXIT);
141
147
 }
142
 
Index: ufsutils/fsck.ufs/inode.c
143
 
===================================================================
144
 
--- ufsutils.orig/fsck.ufs/inode.c
145
 
+++ ufsutils/fsck.ufs/inode.c
146
 
@@ -36,7 +36,7 @@
147
 
 __FBSDID("$FreeBSD: src/sbin/fsck_ffs/inode.c,v 1.38.2.1.2.1 2009/04/15 03:14:26 kensmith Exp $");
 
148
--- a/sbin/fsck_ffs/inode.c
 
149
+++ b/sbin/fsck_ffs/inode.c
 
150
@@ -36,7 +36,7 @@ static const char sccsid[] = "@(#)inode.
 
151
 __FBSDID("$FreeBSD$");
148
152
 
149
153
 #include <sys/param.h>
150
154
-#include <sys/stdint.h>
152
156
 #include <sys/time.h>
153
157
 #include <sys/sysctl.h>
154
158
 
155
 
@@ -47,6 +47,7 @@
 
159
@@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
156
160
 #include <err.h>
157
161
 #include <pwd.h>
158
162
 #include <string.h>
160
164
 
161
165
 #include "fsck.h"
162
166
 
163
 
Index: ufsutils/fsck.ufs/main.c
164
 
===================================================================
165
 
--- ufsutils.orig/fsck.ufs/main.c
166
 
+++ ufsutils/fsck.ufs/main.c
167
 
@@ -45,9 +45,17 @@
 
167
--- a/sbin/fsck_ffs/main.c
 
168
+++ b/sbin/fsck_ffs/main.c
 
169
@@ -45,9 +45,17 @@ __FBSDID("$FreeBSD$");
168
170
 #include <sys/stat.h>
169
171
 #include <sys/file.h>
170
172
 #include <sys/time.h>
182
184
 #include <sys/uio.h>
183
185
 #include <sys/disklabel.h>
184
186
 
185
 
@@ -62,14 +70,18 @@
 
187
@@ -62,14 +70,18 @@ __FBSDID("$FreeBSD$");
186
188
 #include <paths.h>
187
189
 #include <stdint.h>
188
190
 #include <string.h>
192
194
 #include "fsck.h"
193
195
 
194
196
-static void usage(void) __dead2;
195
 
+static void usage(char *progname);
 
197
+static void usage(void);
196
198
 static int argtoi(int flag, const char *req, const char *str, int base);
197
199
 static int checkfilesys(char *filesys);
198
200
 static int chkdoreload(struct statfs *mntp);
202
204
 
203
205
 int
204
206
 main(int argc, char *argv[])
205
 
@@ -78,11 +90,12 @@
206
 
        struct rlimit rlimit;
 
207
@@ -79,10 +91,12 @@ main(int argc, char *argv[])
207
208
        struct itimerval itimerval;
208
209
        int ret = 0;
209
 
+       char *progname = argv[0];
210
210
 
 
211
+       setprogname(argv[0]);
 
212
+
211
213
        sync();
212
214
        skipclean = 1;
213
 
        damagedflag = 0;
214
 
-       while ((ch = getopt(argc, argv, "b:Bc:CdDfFm:npy")) != -1) {
215
 
+       while ((ch = getopt(argc, argv, "ab:Bc:CdDfFm:npy")) != -1) {
 
215
        inoopt = 0;
 
216
-       while ((ch = getopt(argc, argv, "b:Bc:CdfFm:npry")) != -1) {
 
217
+       while ((ch = getopt(argc, argv, "ab:Bc:CdfFm:npry")) != -1) {
216
218
                switch (ch) {
217
219
                case 'b':
218
220
                        skipclean = 0;
219
 
@@ -130,6 +143,7 @@
 
221
@@ -126,6 +140,7 @@ main(int argc, char *argv[])
220
222
                        yflag = 0;
221
223
                        break;
222
224
 
224
226
                case 'p':
225
227
                        preen++;
226
228
                        /*FALLTHROUGH*/
227
 
@@ -144,20 +158,22 @@
228
 
                        break;
229
 
 
230
 
                default:
231
 
-                       usage();
232
 
+                       usage(progname);
233
 
                }
234
 
        }
235
 
        argc -= optind;
236
 
        argv += optind;
237
 
 
238
 
        if (!argc)
239
 
-               usage();
240
 
+               usage(progname);
241
 
 
242
 
        if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 
229
@@ -157,7 +172,9 @@ main(int argc, char *argv[])
243
230
                (void)signal(SIGINT, catch);
244
231
        if (ckclean)
245
232
                (void)signal(SIGQUIT, catchquit);
249
236
        if (bkgrdflag) {
250
237
                signal(SIGALRM, alarmhandler);
251
238
                itimerval.it_interval.tv_sec = 5;
252
 
@@ -204,8 +220,10 @@
 
239
@@ -204,8 +221,10 @@ checkfilesys(char *filesys)
253
240
        ufs2_daddr_t n_ffree, n_bfree;
254
241
        struct dups *dp;
255
242
        struct statfs *mntp;
260
247
        ufs2_daddr_t blks;
261
248
        struct iovec *iov;
262
249
        char errmsg[255];
263
 
@@ -227,10 +245,14 @@
 
250
@@ -226,10 +245,14 @@ checkfilesys(char *filesys)
264
251
         * if it is listed among the mounted file systems. Failing that
265
252
         * check to see if it is listed in /etc/fstab.
266
253
         */
275
262
                filesys = blockcheck(filesys);
276
263
        /*
277
264
         * If -F flag specified, check to see whether a background check
278
 
@@ -248,8 +270,10 @@
 
265
@@ -247,8 +270,10 @@ checkfilesys(char *filesys)
279
266
                if ((sblock.fs_flags & FS_DOSOFTDEP) == 0)
280
267
                        exit(5);        /* Not running soft updates */
281
268
                size = MIBSIZE;
286
273
                if ((mntp == NULL && sblock.fs_clean == 1) ||
287
274
                    (mntp != NULL && (sblock.fs_flags & FS_UNCLEAN) == 0))
288
275
                        exit(7);        /* Filesystem clean, report it now */
289
 
@@ -262,6 +286,7 @@
 
276
@@ -261,6 +286,7 @@ checkfilesys(char *filesys)
290
277
                if ((fsreadfd = open(filesys, O_RDONLY)) < 0 || readsb(0) == 0)
291
278
                        exit(3);        /* Cannot read superblock */
292
279
                close(fsreadfd);
294
281
                if ((sblock.fs_flags & FS_GJOURNAL) != 0) {
295
282
                        //printf("GJournaled file system detected on %s.\n",
296
283
                        //    filesys);
297
 
@@ -279,6 +304,7 @@
 
284
@@ -278,6 +304,7 @@ checkfilesys(char *filesys)
298
285
                                    "CANNOT RUN FAST FSCK\n");
299
286
                        }
300
287
                }
302
289
        }
303
290
        /*
304
291
         * If we are to do a background check:
305
 
@@ -287,6 +313,7 @@
 
292
@@ -286,6 +313,7 @@ checkfilesys(char *filesys)
306
293
         *      return created snapshot file
307
294
         *      if not found, clear bkgrdflag and proceed with normal fsck
308
295
         */
310
297
        if (bkgrdflag) {
311
298
                if (mntp == NULL) {
312
299
                        bkgrdflag = 0;
313
 
@@ -374,6 +401,7 @@
 
300
@@ -368,6 +396,7 @@ checkfilesys(char *filesys)
314
301
                                filesys = snapname;
315
302
                }
316
303
        }
318
305
 
319
306
        switch (setup(filesys)) {
320
307
        case 0:
321
 
@@ -381,7 +409,9 @@
 
308
@@ -375,7 +404,9 @@ checkfilesys(char *filesys)
322
309
                        pfatal("CAN'T CHECK FILE SYSTEM.");
323
310
                return (0);
324
311
        case -1:
328
315
                pwarn("clean, %ld free ", (long)(sblock.fs_cstotal.cs_nffree +
329
316
                    sblock.fs_frag * sblock.fs_cstotal.cs_nbfree));
330
317
                printf("(%lld frags, %lld blocks, %.1f%% fragmentation)\n",
331
 
@@ -401,8 +431,10 @@
 
318
@@ -395,8 +426,10 @@ checkfilesys(char *filesys)
332
319
         */
333
320
        if (preen == 0) {
334
321
                printf("** Last Mounted on %s\n", sblock.fs_fsmnt);
339
326
                printf("** Phase 1 - Check Blocks and Sizes\n");
340
327
        }
341
328
        pass1();
342
 
@@ -501,8 +533,13 @@
 
329
@@ -495,8 +528,13 @@ checkfilesys(char *filesys)
343
330
        /*
344
331
         * Check to see if the file system is mounted read-write.
345
332
         */
353
340
        ckfini(resolved);
354
341
 
355
342
        for (cylno = 0; cylno < sblock.fs_ncg; cylno++)
356
 
@@ -545,6 +582,8 @@
 
343
@@ -537,6 +575,8 @@ chkdoreload(struct statfs *mntp)
357
344
         * it unless it is read-write, so we can continue using it
358
345
         * as safely as possible.
359
346
         */
360
347
+#if HAVE_BSD_STATFS && HAVE_BSD_MOUNT
361
348
+
362
349
        if (mntp->f_flags & MNT_RDONLY) {
363
 
                /*
364
 
                 * XXX: Need to kick out MNT_ROOTFS until we fix
365
 
@@ -573,8 +612,12 @@
 
350
                build_iovec(&iov, &iovlen, "fstype", "ffs", 4);
 
351
                build_iovec(&iov, &iovlen, "from", mntp->f_mntfromname,
 
352
@@ -560,8 +600,12 @@ chkdoreload(struct statfs *mntp)
366
353
                return (1);
367
354
        }
368
355
        return (0);
375
362
 /*
376
363
  * Get the mount point information for name.
377
364
  */
378
 
@@ -614,13 +657,14 @@
 
365
@@ -601,6 +645,7 @@ getmntpt(const char *name)
379
366
        statfsp = NULL;
380
367
        return (statfsp);
381
368
 }
382
369
+#endif
383
370
 
384
371
 static void
385
 
-usage(void)
386
 
+usage(char *progname)
387
 
 {
388
 
         (void) fprintf(stderr,
389
 
             "usage: %s [-BCFpfny] [-b block] [-c level] [-m mode] "
390
 
                         "filesystem ...\n",
391
 
-            getprogname());
392
 
+            progname);
393
 
         exit(1);
394
 
 }
395
 
Index: ufsutils/fsck.ufs/pass1.c
396
 
===================================================================
397
 
--- ufsutils.orig/fsck.ufs/pass1.c
398
 
+++ ufsutils/fsck.ufs/pass1.c
399
 
@@ -317,9 +317,11 @@
 
372
 usage(void)
 
373
--- a/sbin/fsck_ffs/pass1.c
 
374
+++ b/sbin/fsck_ffs/pass1.c
 
375
@@ -357,9 +357,11 @@ checkinode(ino_t inumber, struct inodesc
400
376
        inoinfo(inumber)->ino_type = IFTODT(mode);
401
377
        badblk = dupblk = 0;
402
378
        idesc->id_number = inumber;
408
384
                idesc->id_type = ADDR;
409
385
        (void)ckinode(dp, idesc);
410
386
        if (sblock.fs_magic == FS_UFS2_MAGIC && dp->dp2.di_extsize > 0) {
411
 
Index: ufsutils/fsck.ufs/setup.c
412
 
===================================================================
413
 
--- ufsutils.orig/fsck.ufs/setup.c
414
 
+++ ufsutils/fsck.ufs/setup.c
415
 
@@ -36,11 +36,14 @@
416
 
 __FBSDID("$FreeBSD: src/sbin/fsck_ffs/setup.c,v 1.50.2.2.2.2 2009/04/27 19:15:33 delphij Exp $");
 
387
--- a/sbin/fsck_ffs/setup.c
 
388
+++ b/sbin/fsck_ffs/setup.c
 
389
@@ -36,11 +36,14 @@ static const char sccsid[] = "@(#)setup.
 
390
 __FBSDID("$FreeBSD$");
417
391
 
418
392
 #include <sys/param.h>
419
393
+#include <sys/types.h>
427
401
 
428
402
 #include <ufs/ufs/dinode.h>
429
403
 #include <ufs/ffs/fs.h>
430
 
@@ -51,6 +54,7 @@
 
404
@@ -51,6 +54,7 @@ __FBSDID("$FreeBSD$");
431
405
 #include <limits.h>
432
406
 #include <stdint.h>
433
407
 #include <string.h>
435
409
 
436
410
 #include "fsck.h"
437
411
 
438
 
@@ -87,6 +91,7 @@
 
412
@@ -87,6 +91,7 @@ setup(char *dev)
439
413
                }
440
414
                return (0);
441
415
        }
443
417
        if ((statb.st_mode & S_IFMT) != S_IFCHR &&
444
418
            (statb.st_mode & S_IFMT) != S_IFBLK) {
445
419
                if (bkgrdflag != 0 && (statb.st_flags & SF_SNAPSHOT) == 0) {
446
 
@@ -121,6 +126,7 @@
 
420
@@ -121,6 +126,7 @@ setup(char *dev)
447
421
                        }
448
422
                }
449
423
        }
451
425
        if ((fsreadfd = open(dev, O_RDONLY)) < 0) {
452
426
                if (bkgrdflag) {
453
427
                        unlink(snapname);
454
 
@@ -131,6 +137,7 @@
 
428
@@ -131,6 +137,7 @@ setup(char *dev)
455
429
        }
456
430
        if (bkgrdflag) {
457
431
                unlink(snapname);
459
433
                size = MIBSIZE;
460
434
                if (sysctlnametomib("vfs.ffs.adjrefcnt", adjrefcnt, &size) < 0||
461
435
                    sysctlnametomib("vfs.ffs.adjblkcnt", adjblkcnt, &size) < 0||
462
 
@@ -160,6 +167,7 @@
 
436
@@ -160,6 +167,7 @@ setup(char *dev)
463
437
                }
464
438
                cmd.version = FFS_CMD_VERSION;
465
439
                cmd.handle = fsreadfd;
467
441
                fswritefd = -1;
468
442
        }
469
443
        if (preen == 0)
470
 
@@ -471,6 +479,8 @@
 
444
@@ -471,6 +479,8 @@ calcsb(char *dev, int devfd, struct fs *
471
445
                return (0);
472
446
        }
473
447
        lp = getdisklabel(dev, devfd);
476
450
        if (isdigit(*cp))
477
451
                pp = &lp->d_partitions[0];
478
452
        else
479
 
@@ -521,13 +531,17 @@
 
453
@@ -521,13 +531,17 @@ calcsb(char *dev, int devfd, struct fs *
480
454
 static struct disklabel *
481
455
 getdisklabel(char *s, int fd)
482
456
 {
494
468
        return (&lab);
495
469
+#endif
496
470
 }
497
 
Index: ufsutils/fsck.ufs/utilities.c
498
 
===================================================================
499
 
--- ufsutils.orig/fsck.ufs/utilities.c
500
 
+++ ufsutils/fsck.ufs/utilities.c
501
 
@@ -108,14 +108,16 @@
 
471
--- a/sbin/fsck_ffs/utilities.c
 
472
+++ b/sbin/fsck_ffs/utilities.c
 
473
@@ -108,14 +108,16 @@ retry:
502
474
        return (origname);
503
475
 }
504
476
 
517
489
 {
518
490
        got_sigalarm = 1;
519
491
 }
520
 
Index: ufsutils/fsck.ufs/Makefile
521
 
===================================================================
522
 
--- ufsutils.orig/fsck.ufs/Makefile
523
 
+++ ufsutils/fsck.ufs/Makefile
 
492
--- a/sbin/fsck_ffs/Makefile
 
493
+++ b/sbin/fsck_ffs/Makefile
524
494
@@ -1,19 +1,18 @@
525
 
 # $FreeBSD: src/sbin/fsck_ffs/Makefile,v 1.18.8.1 2009/04/15 03:14:26 kensmith Exp $
 
495
 # $FreeBSD$
526
496
 #      @(#)Makefile    8.2 (Berkeley) 4/27/95
527
497
 
528
498
-PROG=  fsck_ffs
542
512
+LIB_type = static
543
513
+SRCS = main.c
544
514
+MAN = fsck_ffs.8:fsck.ufs.8
545
 
+UFS_SRCS = ../include/ufs/ffs/ffs_subr.c ../include/ufs/ffs/ffs_tables.c
 
515
+UFS_SRCS = ../../sys/ufs/ffs/ffs_subr.c ../../sys/ufs/ffs/ffs_tables.c
546
516
+LIBSRCS= dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c \
547
517
+       pass4.c pass5.c setup.c utilities.c $(UFS_SRCS) gjournal.c \
548
518
+       ../mount/getmntopts.c
549
519
 
550
520
-.PATH: ${.CURDIR}/../../sys/ufs/ffs ${.CURDIR}/../mount
551
 
+LDADD += -L../libport -lport -L. -l$(LIB) -L../libufs -lufs -lbsd
552
 
+INCLUDES = -I. -I../libufs -I../mount
 
521
+LDADD += -L../../lib/port -lport -L. -l$(LIB) -L../../lib/libufs -lufs -lbsd
 
522
+INCLUDES = -I. -I../../lib/libufs -I../mount
553
523
+
554
 
+include ../Makefile.common
 
524
+include ../../Makefile.common
555
525
 
556
526
-.include <bsd.prog.mk>
557
 
--- a/fsck.ufs/fsck.h
558
 
+++ b/fsck.ufs/fsck.h
 
527
--- a/sbin/fsck_ffs/fsck.h
 
528
+++ b/sbin/fsck_ffs/fsck.h
559
529
@@ -63,6 +63,7 @@
560
530
 #include <unistd.h>
561
531
 #include <stdlib.h>