unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Hayden Shenk <hayden.shenk@zetier.com>
To: 55651@debbugs.gnu.org
Subject: bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device
Date: Wed, 25 May 2022 22:12:35 -0400	[thread overview]
Message-ID: <CAPaANeqDEqd1k=BGV7kuKiXMZgExo82eh3q+W_yHaMPRG9vY1w@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4588 bytes --]

Description:
When attempting to open a file on Android devices via tramp using adb
over tcp/ip tramp-adb-get-device throws the following error:

error: "Format specifier doesn’t match argument typex"

Reproducing the bug:
To reproduce the bug set up an android device to connect to over
TCP/IP with adb.  Instructions to do so can be found here:

https://developer.android.com/studio/command-line/adb

In this example, we'll assume the device is listening for adb
connections on 192.168.1.7:7449

Then the bug can be triggered by executing the following bit of elisp:

(find-file "/adb:192.168.1.7#7449:/data/local/tmp")

Patch:
Here is a proposed patch, which fixes the issue on my host:

modified   lisp/net/tramp-adb.el
@@ -1112,9 +1112,9 @@ E.g. a host name \"192.168.1.1#5555\" returns \"
192.168.1.1:5555\"
        tramp-prefix-port-format ":"
        (cond ((member host devices) host)
      ;; This is the case when the host is connected to the default port.
-     ((member (format "%s%s%d" host tramp-prefix-port-format port)
+     ((member (format "%s%s%s" host tramp-prefix-port-format port)
       devices)
-      (format "%s:%d" host port))
+      (format "%s:%s" host port))
      ;; An empty host name shall be mapped as well, when there
      ;; is exactly one entry in `devices'.
      ((and (zerop (length host)) (= (length devices) 1))

In GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version
1.16.0, Xaw scroll bars)
 of 2022-05-24 built on papa-XPS-15-9500
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04.4 LTS

Configured using:
 'configure --with-x-toolkit=lucid --with-mailutils --with-modules
 --enable-gcc-warnings --with-json --with-native-compilation --with-jpeg
 --with-png --with-rsvg --with-tiff --with-wide-int --with-imagemagick'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ IMAGEMAGICK
JPEG JSON LIBSELINUX MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM LUCID
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search seq byte-opt
gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs
cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 70504 11007)
 (symbols 48 7157 0)
 (strings 32 21358 1675)
 (string-bytes 1 686899)
 (vectors 16 14101)
 (vector-slots 8 297090 16970)
 (floats 8 25 38)
 (intervals 56 260 0)
 (buffers 992 11))

[-- Attachment #2: Type: text/html, Size: 5179 bytes --]

             reply	other threads:[~2022-05-26  2:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26  2:12 Hayden Shenk [this message]
2022-05-26 16:14 ` bug#55651: 28.1; Wrong format specifiers in tramp-adb-get-device Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPaANeqDEqd1k=BGV7kuKiXMZgExo82eh3q+W_yHaMPRG9vY1w@mail.gmail.com' \
    --to=hayden.shenk@zetier.com \
    --cc=55651@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).