]> Dogcows Code - chaz/tar/blobdiff - src/rtapelib.c
(_GNU_SOURCE): Define.
[chaz/tar] / src / rtapelib.c
index 937fd70c605c862feb06ed20f4d856c37a4cb4f3..cfc64dadce8fbbb102187c924787bafbd6cf0ca4 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for communicating with a remote tape drive.
-   Copyright (C) 1988, 1992, 1994, 1996 Free Software Foundation, Inc.
+   Copyright 1988, 1992, 1994, 1996, 1997, 1999 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -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.  */
 
@@ -410,11 +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, '/');
-    if (remote_shell_basename)
-      remote_shell_basename++;
-    else
-      remote_shell_basename = remote_shell;
+    remote_shell_basename = base_name (remote_shell);
 
     /* Set up the pipes for the `rsh' command, and fork.  */
 
This page took 0.023975 seconds and 4 git commands to generate.