]> Dogcows Code - chaz/tar/blobdiff - src/rtapelib.c
(decode_options): Set newer_time_option to TYPE_MINIMUM, so that
[chaz/tar] / src / rtapelib.c
index 0afdec9716f05c4ff2cc6e8064a8430174407075..6bbcbd9e1f4944cfd83d3721a14425de2882fa19 100644 (file)
@@ -32,6 +32,9 @@
 
 #include "system.h"
 
+#include "basename.h"
+#include "safe-read.h"
+
 /* Try hard to get EOPNOTSUPP defined.  486/ISC has it in net/errno.h,
    3B2/SVR3 has it in sys/inet.h.  Otherwise, like on MSDOS, use EINVAL.  */
 
@@ -144,7 +147,7 @@ get_status_string (int handle, char *command_buffer)
        counter < COMMAND_BUFFER_SIZE;
        counter++, cursor++)
     {
-      if (full_read (READ_SIDE (handle), cursor, 1) != 1)
+      if (safe_read (READ_SIDE (handle), cursor, 1) != 1)
        {
          _rmt_shutdown (handle, EIO);
          return 0;
@@ -180,7 +183,7 @@ get_status_string (int handle, char *command_buffer)
       {
        char character;
 
-       while (full_read (READ_SIDE (handle), &character, 1) == 1)
+       while (safe_read (READ_SIDE (handle), &character, 1) == 1)
          if (character == '\n')
            break;
       }
@@ -410,7 +413,7 @@ rmt_open__ (const char *path, int open_mode, int bias, const char *remote_shell)
        return -1;
 #endif
       }
-    remote_shell_basename = strrchr (remote_shell, '/');
+    remote_shell_basename = base_name (remote_shell);
     if (remote_shell_basename)
       remote_shell_basename++;
     else
@@ -527,7 +530,7 @@ rmt_read__ (int handle, char *buffer, size_t length)
 
   for (counter = 0; counter < status; counter += rlen, buffer += rlen)
     {
-      rlen = full_read (READ_SIDE (handle), buffer, status - counter);
+      rlen = safe_read (READ_SIDE (handle), buffer, status - counter);
       if (rlen <= 0)
        {
          _rmt_shutdown (handle, EIO);
@@ -661,7 +664,7 @@ rmt_ioctl__ (int handle, int operation, char *argument)
 
        for (; status > 0; status -= counter, argument += counter)
          {
-           counter = full_read (READ_SIDE (handle),
+           counter = safe_read (READ_SIDE (handle),
                                 argument, (size_t) status);
            if (counter <= 0)
              {
This page took 0.021848 seconds and 4 git commands to generate.