summaryrefslogtreecommitdiff
path: root/mail/yatsvrs/patches/patch-as
blob: 5d1d5a389fe2f0363014c72abb4a1dd08330130f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
$NetBSD: patch-as,v 1.2 2003/10/05 04:25:15 taca Exp $

--- yatd/dfree.c.orig	2001-07-09 12:32:52.000000000 +0900
+++ yatd/dfree.c
@@ -72,12 +72,6 @@ quota_get_inode_current __P(( struct dqb
 
 #define DEBUG_LOCAL
 
-#ifndef LONGLONG_OPTC 
-/* LONGLONG_OPTCが定義されていない場合には 空白を定義して,
-   リテラルの糊として使う */
-#define LONGLONG_OPTC /* */
-#endif
-
 int DFreeCheck(pPath, pSizFree, pNodFree)
      char   * pPath;    /* ユーザーのホームディレクトリの位置 */
      OFF_T  * pSizFree; /* 空きブロック数 */
@@ -99,7 +93,7 @@ int DFreeCheck(pPath, pSizFree, pNodFree
   nodLimit = *pNodFree; /* リミットのノード数を指定する */
 
 #ifdef DEBUG_LOCAL
-  LogDEBUG("sizLimit:%" LONGLONG_OPTC  "d, nodLimit:%d, sizof(OFF_T):%d", 
+  LogDEBUG("sizLimit:%" LONGLONG_OPTC  "d, nodLimit:%ld, sizof(OFF_T):%d", 
 	   sizLimit, nodLimit, sizeof (OFF_T));
 #endif /* DEBUG_LOCAL */
 
@@ -123,22 +117,21 @@ int DFreeCheck(pPath, pSizFree, pNodFree
 # ifdef BSD44 
   LogDEBUG("statfs() returns:");
   LogDEBUG("  type: %d", statfsBuf.f_type);
-  LogDEBUG("  flags: 0x%x", statfsBuf.f_flags);
+  LogDEBUG("  flags: 0x%lx", statfsBuf.f_flags);
 #  ifdef __NetBSD__
   LogDEBUG("  oflags: 0x%x", statfsBuf.f_oflags);
 #  endif
 #  ifdef BSDOS1
   LogDEBUG("  fsize: %d", statfsBuf.f_fsize);
 #  endif
-  LogDEBUG("  bsize: %d", statfsBuf.f_bsize);
-  LogDEBUG("  iosize: %d", statfsBuf.f_iosize);
-  LogDEBUG("  blocks: %d", statfsBuf.f_blocks);
-  LogDEBUG("  bfree: %d", statfsBuf.f_bfree);
-  LogDEBUG("  bavail: %d", statfsBuf.f_bavail);
-  LogDEBUG("  files: %d", statfsBuf.f_files);
-  LogDEBUG("  ffree: %d", statfsBuf.f_ffree);
-  LogDEBUG("  fsid: %d", statfsBuf.f_fsid);
-  LogDEBUG("  owner %d", statfsBuf.f_owner);
+  LogDEBUG("  bsize: %ld", statfsBuf.f_bsize);
+  LogDEBUG("  iosize: %ld", statfsBuf.f_iosize);
+  LogDEBUG("  blocks: %ld", statfsBuf.f_blocks);
+  LogDEBUG("  bfree: %ld", statfsBuf.f_bfree);
+  LogDEBUG("  bavail: %ld", statfsBuf.f_bavail);
+  LogDEBUG("  files: %ld", statfsBuf.f_files);
+  LogDEBUG("  ffree: %ld", statfsBuf.f_ffree);
+  LogDEBUG("  fsid: %d-%d", statfsBuf.f_fsid.val[0], statfsBuf.f_fsid.val[1]);
 #ifdef STRUCT_STATFS_HAVE_F_FSTYPENAME
   LogDEBUG("  fstypename: %.256s", statfsBuf.f_fstypename);
 #endif
@@ -311,7 +304,7 @@ int FuncDFree()
   nodFree = SysData.nodLimitFree;
 
 #ifdef DEBUG_LOCAL
-    LogDEBUG("FuncDFree(): sizFree:%" LONGLONG_OPTC "d, nodFree:%d",
+    LogDEBUG("FuncDFree(): sizFree:%" LONGLONG_OPTC "d, nodFree:%ld",
 	     sizFree, nodFree);
 #endif
     
@@ -325,7 +318,7 @@ int FuncDFree()
     if (DFreeCheck(SysData.szUserFldrDir, &sizFree, &nodFree)){
       return FAILURE;
     }
-    Msg2Cli(SUCCESS, "%" LONGLONG_OPTC "d %d", sizFree, nodFree);
+    Msg2Cli(SUCCESS, "%" LONGLONG_OPTC "d %ld", sizFree, nodFree);
 #endif /* DONT_CHECKDFREE */
   return SUCCESS;
 }
@@ -427,7 +420,7 @@ static inline quota_size_t quota_get_ino
 
 #ifdef STRUCT_DQBLK_CURRENT_FILES
   retval = (quota_size_t)quota_block->dqb_curfiles;
-#endif STRUCT_DQBLK_CURRENT_FILES
+#endif /* STRUCT_DQBLK_CURRENT_FILES */
 
   return retval;
 }
@@ -449,12 +442,12 @@ static int quotactl_wrapper(pPath,quota_
   switch( status ){
   case SUCCESS:
     LogDEBUG("quotactl() returns:");
-    LogDEBUG(" bhardlimit: %d",quota_get_block_hard_limit(quota_block));
-    LogDEBUG(" bsoftlimit: %d",quota_get_block_soft_limit(quota_block));
-    LogDEBUG(" curblocks : %d",quota_get_block_current(quota_block));
-    LogDEBUG(" ihardlimit: %d",quota_get_inode_hard_limit(quota_block));
-    LogDEBUG(" isoftlimit: %d",quota_get_inode_soft_limit(quota_block));
-    LogDEBUG(" curinodes : %d", quota_get_inode_current(quota_block));
+    LogDEBUG(" bhardlimit: %ld",quota_get_block_hard_limit(quota_block));
+    LogDEBUG(" bsoftlimit: %ld",quota_get_block_soft_limit(quota_block));
+    LogDEBUG(" curblocks : %ld",quota_get_block_current(quota_block));
+    LogDEBUG(" ihardlimit: %ld",quota_get_inode_hard_limit(quota_block));
+    LogDEBUG(" isoftlimit: %ld",quota_get_inode_soft_limit(quota_block));
+    LogDEBUG(" curinodes : %ld", quota_get_inode_current(quota_block));
     return SUCCESS;
   case FAILURE:
     return FAILURE;