chiark / gitweb /
* summer has new -M (do not print mtimes) option.
authorianmdlvl <ianmdlvl>
Wed, 23 May 2007 17:57:00 +0000 (17:57 +0000)
committerianmdlvl <ianmdlvl>
Wed, 23 May 2007 17:57:00 +0000 (17:57 +0000)
cprogs/summer.c
debian/changelog

index 5e85111218c6a35567604c31edf2739c3d91adea..3970c369b58477ae6390af6be8c874999fc92c9b 100644 (file)
@@ -26,7 +26,7 @@
 #define MAXDEPTH 1024
 #define CSUMXL 32
 
-static int quiet=0, hidectime=0, hideatime=0;
+static int quiet=0, hidectime=0, hideatime=0, hidemtime=0;
 static int hidedirsize=0, hidelinkmtime=0, onefilesystem=0;
 static int filenamefieldsep=' ';
 static FILE *errfile;
@@ -238,14 +238,16 @@ static void node(const char *path, unsigned nodeflags, dev_t fs) {
       pu10();
   }
 
-  if (stab)
-    if (S_ISLNK(stab->st_mode) && hidelinkmtime)
-      printf(" %10s","link");
+  if (!hidemtime) {
+    if (stab)
+      if (S_ISLNK(stab->st_mode) && hidelinkmtime)
+       printf(" %10s","link");
+      else
+       printf(" %10lu",
+              (unsigned long)stab->st_mtime);
     else
-      printf(" %10lu",
-            (unsigned long)stab->st_mtime);
-  else
-    pu10();
+      pu10();
+  }
 
   if (!hidectime) {
     if (stab)
@@ -388,6 +390,9 @@ int main(int argc, const char *const *argv) {
       case 'A':
        hideatime= 1;
        break;
+      case 'M':
+       hidemtime= 1;
+       break;
       case 'f':
        errfile= stdout;
        break;
index 2bc2e8fc0a9db2a473dbc2b04c7812fd228fbc5d..2c8e55c9aedfd3b63f26ec4645a665c8e828cc3e 100644 (file)
@@ -1,3 +1,9 @@
+chiark-utils (4.1.17) unstable; urgency=low
+
+  * summer has new -M (do not print mtimes) option.
+
+ -- Ian Jackson <ian@davenant.greenend.org.uk>  Wed, 23 May 2007 18:56:53 +0100
+
 chiark-utils (4.1.16) unstable; urgency=low
 
   * chiark-backup's snaprsync has new rsynccompress option.