Skip to content

Commit

Permalink
[usb-moded] Remove trailing whitespace in logging/output
Browse files Browse the repository at this point in the history
Whitespace in logging is stripped anyway and outputting trailing
spaces for --help lines does not make any sense either.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Jun 5, 2020
1 parent 80d0d0e commit 557b1a7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/usb_moded-appsync-dbus.c
Expand Up @@ -91,7 +91,7 @@ static void dbusappsync_release_name(void)

if( dbus_error_is_set(&error) )
{
log_debug("DBUS ERROR: %s, %s \n", error.name, error.message);
log_debug("DBUS ERROR: %s, %s", error.name, error.message);
dbus_error_free(&error);
}
}
Expand Down Expand Up @@ -144,7 +144,7 @@ static gboolean dbusappsync_obtain_name(void)

if( dbus_error_is_set(&error) )
{
log_debug("DBUS ERROR: %s, %s \n", error.name, error.message);
log_debug("DBUS ERROR: %s, %s", error.name, error.message);
dbus_error_free(&error);
}

Expand Down
4 changes: 2 additions & 2 deletions src/usb_moded-appsync.c
Expand Up @@ -280,7 +280,7 @@ int appsync_activate_sync(const char *mode)
/* check dbus initialisation, skip dbus activated services if this fails */
if(!dbusappsync_init())
{
log_debug("dbus setup failed => skipping dbus launched apps \n");
log_debug("dbus setup failed => skipping dbus launched apps");
appsync_no_dbus = 1;
}

Expand Down Expand Up @@ -347,7 +347,7 @@ int appsync_activate_sync_post(const char *mode)
/* check dbus initialisation, skip dbus activated services if this fails */
if(!dbusappsync_init())
{
log_debug("dbus setup failed => skipping dbus launched apps \n");
log_debug("dbus setup failed => skipping dbus launched apps");
appsync_no_dbus = 1;
}
#endif /* APP_SYNC_DBUS */
Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded-dbus.c
Expand Up @@ -808,7 +808,7 @@ gboolean umdbus_init_service(void)
{
log_debug("failed claiming dbus name\n");
if( dbus_error_is_set(&error) )
log_debug("DBUS ERROR: %s, %s \n", error.name, error.message);
log_debug("DBUS ERROR: %s, %s", error.name, error.message);
goto EXIT;
}
log_debug("claimed name %s", USB_MODE_SERVICE);
Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded-modesetting.c
Expand Up @@ -527,7 +527,7 @@ static bool modesetting_enter_mass_storage_mode(const modedata_t *data)
log_debug("%s does not exist, unloading and reloading mass_storage\n", tmp);
modules_unload_module(MODULE_MASS_STORAGE);
snprintf(tmp, sizeof tmp, "modprobe %s luns=%zd", MODULE_MASS_STORAGE, count);
log_debug("usb-load command = %s \n", tmp);
log_debug("usb-load command = %s", tmp);
if( common_system(tmp) != 0 )
goto EXIT;
}
Expand Down
18 changes: 9 additions & 9 deletions src/usb_moded.c
Expand Up @@ -925,27 +925,27 @@ static const char usbmoded_usage_info[] =
" keep gadget active on broken android kernels\n"
" -i, --android_usb_broken_udev_events\n"
" ignore incorrect disconnect events after mode setting\n"
" -f, --fallback \n"
" -f, --fallback\n"
" assume always connected\n"
" -s, --force-syslog \n"
" -s, --force-syslog\n"
" log to syslog\n"
" -T, --force-stderr \n"
" -T, --force-stderr\n"
" log to stderr\n"
" -l, --log-line-info\n"
" log to stderr and show origin of logging\n"
" -D, --debug \n"
" -D, --debug\n"
" turn on debug printing\n"
" -d, --diag \n"
" -d, --diag\n"
" turn on diag mode\n"
" -h, --help \n"
" -h, --help\n"
" display this help and exit\n"
" -r, --rescue \n"
" -r, --rescue\n"
" rescue mode\n"
#ifdef SYSTEMD
" -n, --systemd \n"
" -n, --systemd\n"
" notify systemd when started up\n"
#endif
" -v, --version \n"
" -v, --version\n"
" output version information and exit\n"
" -m, --max-cable-delay=<ms>\n"
" maximum delay before accepting cable connection\n"
Expand Down

0 comments on commit 557b1a7

Please sign in to comment.