Browse Source

Fix calls of vfs_print_message().

Andrew Borodin 9 years ago
parent
commit
bb6f1e6695

+ 1 - 1
lib/vfs/direntry.c

@@ -1289,7 +1289,7 @@ vfs_s_open (const vfs_path_t * vpath, int flags, mode_t mode)
     {
         if (VFSDATA (path_element)->linear_start)
         {
-            vfs_print_message (_("Starting linear transfer..."));
+            vfs_print_message ("%s", _("Starting linear transfer..."));
             fh->linear = LS_LINEAR_PREOPEN;
         }
     }

+ 7 - 7
src/vfs/fish/fish.c

@@ -518,7 +518,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
     if (!ftalk)
         ERRNOR (E_PROTO, -1);
 
-    vfs_print_message (_("fish: Sending initial line..."));
+    vfs_print_message ("%s", _("fish: Sending initial line..."));
     /*
      * Run 'start_fish_server'. If it doesn't exist - no problem,
      * we'll talk directly to the shell.
@@ -529,7 +529,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
          "#FISH\necho; start_fish_server 2>&1; echo '### 200'\n") != COMPLETE)
         ERRNOR (E_PROTO, -1);
 
-    vfs_print_message (_("fish: Handshaking version..."));
+    vfs_print_message ("%s", _("fish: Handshaking version..."));
     if (fish_command (me, super, WAIT_REPLY, "%s", "#VER 0.0.3\necho '### 000'\n") != COMPLETE)
         ERRNOR (E_PROTO, -1);
 
@@ -539,7 +539,7 @@ fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super)
          "LANG=C LC_ALL=C LC_TIME=C; export LANG LC_ALL LC_TIME;\n" "echo '### 200'\n") != COMPLETE)
         ERRNOR (E_PROTO, -1);
 
-    vfs_print_message (_("fish: Getting host info..."));
+    vfs_print_message ("%s", _("fish: Getting host info..."));
     if (fish_info (me, super))
         SUP->scr_env = fish_set_env (SUP->host_flags);
 
@@ -941,7 +941,7 @@ fish_file_store (struct vfs_class *me, vfs_file_handler_t * fh, char *name, char
         {
             if ((errno == EINTR) && tty_got_interrupt ())
                 continue;
-            vfs_print_message (_("fish: Local read failed, sending zeros"));
+            vfs_print_message ("%s", _("fish: Local read failed, sending zeros"));
             close (h);
             h = open ("/dev/zero", O_RDONLY);
         }
@@ -1036,7 +1036,7 @@ fish_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh)
     char buffer[BUF_8K];
     ssize_t n;
 
-    vfs_print_message (_("Aborting transfer..."));
+    vfs_print_message ("%s", _("Aborting transfer..."));
 
     do
     {
@@ -1052,9 +1052,9 @@ fish_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh)
     while (n != 0);
 
     if (fish_get_reply (me, SUP->sockr, NULL, 0) != COMPLETE)
-        vfs_print_message (_("Error reported after abort."));
+        vfs_print_message ("%s", _("Error reported after abort."));
     else
-        vfs_print_message (_("Aborted transfer would be successful."));
+        vfs_print_message ("%s", _("Aborted transfer would be successful."));
 }
 
 /* --------------------------------------------------------------------------------------------- */

+ 16 - 16
src/vfs/ftpfs/ftpfs.c

@@ -639,12 +639,12 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, const char
             fflush (MEDATA->logfile);
         }
 
-        vfs_print_message (_("ftpfs: sending login name"));
+        vfs_print_message ("%s", _("ftpfs: sending login name"));
 
         switch (ftpfs_command (me, super, WAIT_REPLY, "USER %s", name))
         {
         case CONTINUE:
-            vfs_print_message (_("ftpfs: sending user password"));
+            vfs_print_message ("%s", _("ftpfs: sending user password"));
             code = ftpfs_command (me, super, WAIT_REPLY, "PASS %s", pass);
             if (code == CONTINUE)
             {
@@ -657,7 +657,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, const char
                 g_free (p);
                 if (op == NULL)
                     ERRNOR (EPERM, 0);
-                vfs_print_message (_("ftpfs: sending user account"));
+                vfs_print_message ("%s", _("ftpfs: sending user account"));
                 code = ftpfs_command (me, super, WAIT_REPLY, "ACCT %s", op);
                 g_free (op);
             }
@@ -666,7 +666,7 @@ ftpfs_login_server (struct vfs_class *me, struct vfs_s_super *super, const char
             /* fall through */
 
         case COMPLETE:
-            vfs_print_message (_("ftpfs: logged in"));
+            vfs_print_message ("%s", _("ftpfs: logged in"));
             wipe_password (pass);
             g_free (name);
             return 1;
@@ -811,7 +811,7 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super)
 
     if (host == NULL || *host == '\0')
     {
-        vfs_print_message (_("ftpfs: Invalid host name."));
+        vfs_print_message ("%s", _("ftpfs: Invalid host name."));
         ftpfs_errno = EINVAL;
         g_free (host);
         return -1;
@@ -893,7 +893,7 @@ ftpfs_open_socket (struct vfs_class *me, struct vfs_s_super *super)
         close (my_socket);
 
         if (errno == EINTR && tty_got_interrupt ())
-            vfs_print_message (_("ftpfs: connection interrupted by user"));
+            vfs_print_message ("%s", _("ftpfs: connection interrupted by user"));
         else if (res->ai_next == NULL)
             vfs_print_message (_("ftpfs: connection to server failed: %s"),
                                unix_error_string (errno));
@@ -1279,7 +1279,7 @@ ftpfs_init_data_socket (struct vfs_class *me, struct vfs_s_super *super,
         ((struct sockaddr_in6 *) data_addr)->sin6_port = 0;
         break;
     default:
-        vfs_print_message (_("ftpfs: invalid address family"));
+        vfs_print_message ("%s", _("ftpfs: invalid address family"));
         ERRNOR (EINVAL, -1);
     }
 
@@ -1321,7 +1321,7 @@ ftpfs_initconn (struct vfs_class *me, struct vfs_s_super *super)
         if (ftpfs_setup_passive (me, super, data_sock, &data_addr, &data_addrlen))
             return data_sock;
 
-        vfs_print_message (_("ftpfs: could not setup passive mode"));
+        vfs_print_message ("%s", _("ftpfs: could not setup passive mode"));
         SUP->use_passive_connection = 0;
 
         close (data_sock);
@@ -1423,7 +1423,7 @@ ftpfs_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh)
     FH_SOCK = -1;
     SUP->ctl_connection_busy = 0;
 
-    vfs_print_message (_("ftpfs: aborting transfer."));
+    vfs_print_message ("%s", _("ftpfs: aborting transfer."));
     if (send (SUP->sock, ipbuf, sizeof (ipbuf), MSG_OOB) != sizeof (ipbuf))
     {
         vfs_print_message (_("ftpfs: abort error: %s"), unix_error_string (errno));
@@ -1434,7 +1434,7 @@ ftpfs_linear_abort (struct vfs_class *me, vfs_file_handler_t * fh)
 
     if (ftpfs_command (me, super, NONE, "%cABOR", DM) != COMPLETE)
     {
-        vfs_print_message (_("ftpfs: abort failed"));
+        vfs_print_message ("%s", _("ftpfs: abort failed"));
         if (dsock != -1)
             close (dsock);
         return;
@@ -1565,7 +1565,7 @@ resolve_symlink_with_ls_options (struct vfs_class *me, struct vfs_s_super *super
     {
         if (ftpfs_chdir_internal (bucket, dir->remote_path) != COMPLETE)
         {
-            vfs_print_message (_("ftpfs: CWD failed."));
+            vfs_print_message ("%s", _("ftpfs: CWD failed."));
             return;
         }
         sock = ftpfs_open_data_connection (bucket, "LIST -lLa", ".", TYPE_ASCII, 0);
@@ -1575,7 +1575,7 @@ resolve_symlink_with_ls_options (struct vfs_class *me, struct vfs_s_super *super
 
     if (sock == -1)
     {
-        vfs_print_message (_("ftpfs: couldn't resolve symlink"));
+        vfs_print_message ("%s", _("ftpfs: couldn't resolve symlink"));
         return;
     }
 
@@ -1583,7 +1583,7 @@ resolve_symlink_with_ls_options (struct vfs_class *me, struct vfs_s_super *super
     if (fp == NULL)
     {
         close (sock);
-        vfs_print_message (_("ftpfs: couldn't resolve symlink"));
+        vfs_print_message ("%s", _("ftpfs: couldn't resolve symlink"));
         return;
     }
     tty_enable_interrupt_key ();
@@ -1644,7 +1644,7 @@ resolve_symlink_with_ls_options (struct vfs_class *me, struct vfs_s_super *super
 static void
 resolve_symlink (struct vfs_class *me, struct vfs_s_super *super, struct vfs_s_inode *dir)
 {
-    vfs_print_message (_("Resolving symlink..."));
+    vfs_print_message ("%s", _("Resolving symlink..."));
 
     if (SUP->strict_rfc959_list_cmd)
         resolve_symlink_without_ls_options (me, super, dir);
@@ -1677,7 +1677,7 @@ ftpfs_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path
         if (ftpfs_chdir_internal (me, super, remote_path) != COMPLETE)
         {
             ftpfs_errno = ENOENT;
-            vfs_print_message (_("ftpfs: CWD failed."));
+            vfs_print_message ("%s", _("ftpfs: CWD failed."));
             return -1;
         }
     }
@@ -1792,7 +1792,7 @@ ftpfs_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path
         cd_first = 1;
         goto again;
     }
-    vfs_print_message (_("ftpfs: failed; nowhere to fallback to"));
+    vfs_print_message ("%s", _("ftpfs: failed; nowhere to fallback to"));
     ERRNOR (EACCES, -1);
 }
 

+ 1 - 1
src/vfs/sftpfs/vfs_class.c

@@ -214,7 +214,7 @@ sftpfs_cb_readdir (void *data)
         if (sftpfs_dirent != NULL)
             vfs_print_message (_("sftp: (Ctrl-G break) Listing... %s"), sftpfs_dirent->dent.d_name);
         else
-            vfs_print_message (_("sftp: Listing done."));
+            vfs_print_message ("%s", _("sftp: Listing done."));
     }
 
     return sftpfs_dirent;

+ 1 - 1
src/vfs/sftpfs/vfs_subclass.c

@@ -98,7 +98,7 @@ sftpfs_cb_open_connection (struct vfs_s_super *super,
 
     if (vpath_element->host == NULL || *vpath_element->host == '\0')
     {
-        vfs_print_message (_("sftp: Invalid host name."));
+        vfs_print_message ("%s", _("sftp: Invalid host name."));
         vpath_element->class->verrno = EPERM;
         return -1;
     }

+ 2 - 2
src/vfs/undelfs/undelfs.c

@@ -368,13 +368,13 @@ undelfs_opendir (const vfs_path_t * vpath)
         message (D_ERROR, undelfserr, _("Cannot open file %s"), ext2_fname);
         return 0;
     }
-    vfs_print_message (_("undelfs: reading inode bitmap..."));
+    vfs_print_message ("%s", _("undelfs: reading inode bitmap..."));
     if (ext2fs_read_inode_bitmap (fs))
     {
         message (D_ERROR, undelfserr, _("Cannot load inode bitmap from:\n%s"), ext2_fname);
         goto quit_opendir;
     }
-    vfs_print_message (_("undelfs: reading block bitmap..."));
+    vfs_print_message ("%s", _("undelfs: reading block bitmap..."));
     if (ext2fs_read_block_bitmap (fs))
     {
         message (D_ERROR, undelfserr, _("Cannot load block bitmap from:\n%s"), ext2_fname);