OSDN Git Service

Merge remote-tracking branch 'toybox/master' into HEAD
authorElliott Hughes <enh@google.com>
Tue, 21 Jul 2015 16:38:32 +0000 (09:38 -0700)
committerElliott Hughes <enh@google.com>
Tue, 21 Jul 2015 16:38:32 +0000 (09:38 -0700)
main.c
toys/pending/ps.c
toys/posix/cat.c
www/header.html

diff --git a/main.c b/main.c
index c557030..8115559 100644 (file)
--- a/main.c
+++ b/main.c
@@ -6,7 +6,7 @@
 #include "toys.h"
 
 #ifndef TOYBOX_VERSION
-#define TOYBOX_VERSION "0.5.2"
+#define TOYBOX_VERSION "0.6.0"
 #endif
 
 // Populate toy_list[].
index cb0f32c..29111d5 100644 (file)
@@ -312,7 +312,7 @@ void ps_main(void)
           if (j!=2) break;
         }
         if (i == ARRAY_LEN(typos)) error_exit("bad -o %.*s", end-type, type);
-        if (!field->title) strcpy(field->title, typos[field->which]);
+        if (!*field->title) strcpy(field->title, typos[field->which]);
         dlist_add_nomalloc((void *)&TT.fields, (void *)field);
       }
     }
index 01134a7..3aae4a1 100644 (file)
@@ -57,7 +57,10 @@ static void do_cat(int fd, char *name)
 
   for(;;) {
     len = read(fd, toybuf, size);
-    if (len < 0) toys.exitval = EXIT_FAILURE;
+    if (len < 0) {
+      toys.exitval = EXIT_FAILURE;
+      perror_msg("%s", name);
+    }
     if (len < 1) break;
     if ((CFG_CAT_V || CFG_CATV) && (toys.optflags&~FLAG_u)) {
       for (i=0; i<len; i++) {
index 0059dac..56396d5 100644 (file)
@@ -32,6 +32,7 @@
     <li><a href="code.html">Source walkthrough</a></li>
     <li><a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net">Mailing List</a> (<a href=http://news.gmane.org/gmane.linux.toybox>backup archive</a>)</li>
     <li>IRC #toybox on freenode.net</li>
+    <li><a href=https://github.com/landley/toybox/commits/master.atom>Commit RSS feed</a></li>
     <li><a href="/notes.html">Maintainer's Blog</a></li>
     <li><a href=cleanup.html>Cleanup</a></li>
     <li><a href=http://www.ohloh.net/p/toybox-landley>Statistics</a></li>