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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Robert Millan
  • Date: 2013-11-29 14:21:12 UTC
  • mfrom: (11.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20131129142112-5tz5g7a4b6prb0dt
Tags: 9.2-2
* Avoid kfreebsd-kernel-headers versions prior to ino_t fix.
* Remove gratuitous dependency on libtermcap / libtinfo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
---
2
 
 sbin/fsdb/Makefile   |    2 +-
3
 
 sbin/fsdb/fsdb.8     |    2 +-
4
 
 sbin/fsdb/fsdb.c     |   14 +++++++++++++-
5
 
 sbin/fsdb/fsdbutil.c |   13 ++++++++++++-
6
 
 4 files changed, 27 insertions(+), 4 deletions(-)
7
 
 
8
 
--- a/sbin/fsdb/fsdb.8
9
 
+++ b/sbin/fsdb/fsdb.8
10
 
@@ -263,7 +263,7 @@ There are a bunch of other things that y
11
 
 .Nm
12
 
 does not implement.
13
 
 .Sh WARNING
14
 
-Use this tool with extreme caution--you can damage an FFS file system
15
 
+Use this tool with extreme caution\-\-you can damage an FFS file system
16
 
 beyond what
17
 
 .Xr fsck 8
18
 
 can repair.
19
 
--- a/sbin/fsdb/fsdb.c
20
 
+++ b/sbin/fsdb/fsdb.c
21
 
@@ -35,13 +35,13 @@ static const char rcsid[] =
22
 
 
23
 
 #include <sys/param.h>
24
 
 #include <sys/time.h>
25
 
+#include <time.h>
26
 
 #include <ctype.h>
27
 
 #include <err.h>
28
 
 #include <grp.h>
29
 
 #include <histedit.h>
30
 
 #include <pwd.h>
31
 
 #include <string.h>
32
 
-#include <timeconv.h>
33
 
 
34
 
 #include <ufs/ufs/dinode.h>
35
 
 #include <ufs/ufs/dir.h>
36
 
@@ -60,6 +60,18 @@ static int find_blks64(uint64_t *buf, in
37
 
 static int find_indirblks32(uint32_t blk, int ind_level, uint32_t *blknum);
38
 
 static int find_indirblks64(uint64_t blk, int ind_level, uint64_t *blknum);
39
 
 
40
 
+static inline int32_t
41
 
+_time_to_time32(time_t t)
42
 
+{
43
 
+    return((int32_t)t);
44
 
+}
45
 
+
46
 
+static inline int64_t
47
 
+_time_to_time64(time_t t)
48
 
+{
49
 
+    return((int64_t)t);
50
 
+}    
51
 
+
52
 
 static void 
53
 
 usage(void)
54
 
 {
55
 
--- a/sbin/fsdb/fsdbutil.c
56
 
+++ b/sbin/fsdb/fsdbutil.c
57
 
@@ -41,7 +41,6 @@ static const char rcsid[] =
58
 
 #include <stdint.h>
59
 
 #include <string.h>
60
 
 #include <time.h>
61
 
-#include <timeconv.h>
62
 
 
63
 
 #include <ufs/ufs/dinode.h>
64
 
 #include <ufs/ffs/fs.h>
65
 
@@ -51,6 +50,18 @@ static const char rcsid[] =
66
 
 #include "fsdb.h"
67
 
 #include "fsck.h"
68
 
 
69
 
+static inline time_t
70
 
+_time64_to_time(int64_t t64)
71
 
+{
72
 
+    return((time_t)t64);
73
 
+}
74
 
+    
75
 
+static inline time_t
76
 
+_time32_to_time(int32_t t32)
77
 
+{
78
 
+    return((time_t)t32);
79
 
+}
80
 
+    
81
 
 static int charsperline(void);
82
 
 static int printindir(ufs2_daddr_t blk, int level, char *bufp);
83
 
 static void printblocks(ino_t inum, union dinode *dp);
84
 
--- a/sbin/fsdb/Makefile
85
 
+++ b/sbin/fsdb/Makefile
86
 
@@ -9,7 +9,7 @@ SRCS=   fsdb.c fsdbutil.c \
87
 
        pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c
88
 
 CFLAGS+= -I${.CURDIR}/../fsck_ffs
89
 
 WARNS?= 2
90
 
-LDADD= -ledit -ltermcap
91
 
+LDADD= -ledit
92
 
 DPADD= ${LIBEDIT} ${LIBTERMCAP}
93
 
 .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
94