summaryrefslogtreecommitdiffstats
path: root/ui/common
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2018-08-02 17:29:34 +0000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-08-07 11:30:36 +1000
commitc78f9ec47ba92b74698dacdae963dbbefd9b676f (patch)
tree58ce2f0f50f8edb451f81d9ecedc9abc842bc3d6 /ui/common
parent679d9dceb5bdf51f118548ca2645dc81088a8974 (diff)
downloadtalos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.tar.gz
talos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.zip
lib/log: Switch to pb_log_fn
The only functional change should be an additional '/n' to a few log messagees that seemed to be missing it. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui/common')
-rw-r--r--ui/common/discover-client.c20
-rw-r--r--ui/common/joystick.c4
-rw-r--r--ui/common/ps3.c18
-rw-r--r--ui/common/timer.c2
-rw-r--r--ui/common/ui-system.c2
5 files changed, 23 insertions, 23 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c
index 88d0b4e..d941497 100644
--- a/ui/common/discover-client.c
+++ b/ui/common/discover-client.c
@@ -197,7 +197,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_device(dev, message);
if (rc) {
- pb_log("%s: no device?\n", __func__);
+ pb_log_fn("no device?\n");
goto out;
}
@@ -208,7 +208,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_boot_option(opt, message);
if (rc) {
- pb_log("%s: no boot_option?\n", __func__);
+ pb_log_fn("no boot_option?\n");
goto out;
}
@@ -217,7 +217,7 @@ static int discover_client_process(void *arg)
case PB_PROTOCOL_ACTION_DEVICE_REMOVE:
dev_id = pb_protocol_deserialise_string(ctx, message);
if (!dev_id) {
- pb_log("%s: no device id?\n", __func__);
+ pb_log_fn("no device id?\n");
goto out;
}
device_remove(client, dev_id);
@@ -227,7 +227,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_boot_status(status, message);
if (rc) {
- pb_log("%s: invalid status message?\n", __func__);
+ pb_log_fn("invalid status message?\n");
goto out;
}
update_status(client, status);
@@ -237,7 +237,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_system_info(sysinfo, message);
if (rc) {
- pb_log("%s: invalid sysinfo message?\n", __func__);
+ pb_log_fn("invalid sysinfo message?\n");
goto out;
}
update_sysinfo(client, sysinfo);
@@ -247,7 +247,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_config(config, message);
if (rc) {
- pb_log("%s: invalid config message?\n", __func__);
+ pb_log_fn("invalid config message?\n");
goto out;
}
update_config(client, config);
@@ -257,7 +257,7 @@ static int discover_client_process(void *arg)
rc = pb_protocol_deserialise_plugin_option(p_opt, message);
if (rc) {
- pb_log("%s: no plugin_option?\n", __func__);
+ pb_log_fn("no plugin_option?\n");
goto out;
}
@@ -267,7 +267,7 @@ static int discover_client_process(void *arg)
plugins_remove(client);
break;
default:
- pb_log("%s: unknown action %d\n", __func__, message->action);
+ pb_log_fn("unknown action %d\n", message->action);
}
out:
@@ -291,7 +291,7 @@ struct discover_client* discover_client_init(struct waitset *waitset,
client->fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (client->fd < 0) {
- pb_log("%s: socket: %s\n", __func__, strerror(errno));
+ pb_log_fn("socket: %s\n", strerror(errno));
goto out_err;
}
@@ -304,7 +304,7 @@ struct discover_client* discover_client_init(struct waitset *waitset,
strcpy(addr.sun_path, PB_SOCKET_PATH);
if (connect(client->fd, (struct sockaddr *)&addr, sizeof(addr))) {
- pb_log("%s: connect: %s\n", __func__, strerror(errno));
+ pb_log_fn("connect: %s\n", strerror(errno));
goto out_err;
}
diff --git a/ui/common/joystick.c b/ui/common/joystick.c
index a3d6abd..f75ae3d 100644
--- a/ui/common/joystick.c
+++ b/ui/common/joystick.c
@@ -47,7 +47,7 @@ int pjs_process_event(const struct pjs *pjs)
result = read(pjs->fd, &e, sizeof(e));
if (result != sizeof(e)) {
- pb_log("%s: read failed: %s\n", __func__, strerror(errno));
+ pb_log_fn("read failed: %s\n", strerror(errno));
return 0;
}
@@ -86,7 +86,7 @@ struct pjs *pjs_init(void *ctx, int (*map)(const struct js_event *))
pjs->fd = open(dev_name, O_RDONLY | O_NONBLOCK);
if (pjs->fd < 0) {
- pb_log("%s: open %s failed: %s\n", __func__, dev_name,
+ pb_log_fn("open %s failed: %s\n", dev_name,
strerror(errno));
goto out_err;
}
diff --git a/ui/common/ps3.c b/ui/common/ps3.c
index c9b97b5..d2a57a5 100644
--- a/ui/common/ps3.c
+++ b/ui/common/ps3.c
@@ -79,7 +79,7 @@ static int ps3_flash_open(struct ps3_flash_ctx *fc, const char *mode)
fc->dev = fopen(flash_dev, mode);
if (!fc->dev) {
- pb_log("%s: fopen failed: %s: %s\n", __func__, strerror(errno),
+ pb_log_fn("fopen failed: %s: %s\n", strerror(errno),
flash_dev);
return -1;
}
@@ -89,7 +89,7 @@ static int ps3_flash_open(struct ps3_flash_ctx *fc, const char *mode)
result = os_area_fixed_read(&fc->header, &fc->params, fc->dev);
if (result) {
- pb_log("%s: os_area_fixed_read failed\n", __func__);
+ pb_log_fn("os_area_fixed_read failed\n");
goto fail;
}
@@ -123,7 +123,7 @@ int ps3_flash_get_values(struct ps3_flash_values *values)
ps3_flash_close(&fc);
if (result) {
- pb_log("%s: os_area_db_read failed: %s\n", __func__,
+ pb_log_fn("os_area_db_read failed: %s\n",
strerror(errno));
goto fail;
}
@@ -176,14 +176,14 @@ int ps3_flash_set_values(const struct ps3_flash_values *values)
result = os_area_db_read(&fc.db, &fc.header, fc.dev);
if (result) {
- pb_log("%s: os_area_db_read failed: %s\n", __func__,
+ pb_log_fn("os_area_db_read failed: %s\n",
strerror(errno));
- pb_log("%s: formating db\n", __func__);
+ pb_log_fn("formating db\n");
result = os_area_db_format(&fc.db, &fc.header, fc.dev);
if (result) {
- pb_log("%s: db_format failed: %s\n", __func__,
+ pb_log_fn("db_format failed: %s\n",
strerror(errno));
goto fail;
}
@@ -220,7 +220,7 @@ static int ps3_video_ioctl(int request, unsigned int *mode_id)
fd = open(fb_dev, O_RDWR);
if (fd < 0) {
- pb_log("%s: open failed: %s: %s\n", __func__, strerror(errno),
+ pb_log_fn("open failed: %s: %s\n", strerror(errno),
fb_dev);
return -1;
}
@@ -230,7 +230,7 @@ static int ps3_video_ioctl(int request, unsigned int *mode_id)
close(fd);
if (result < 0) {
- pb_log("%s: ioctl failed: %s: %s\n", __func__, strerror(errno),
+ pb_log_fn("ioctl failed: %s: %s\n", strerror(errno),
fb_dev);
return -1;
}
@@ -266,6 +266,6 @@ int ps3_get_video_mode(unsigned int *mode_id)
result = ps3_video_ioctl(PS3FB_IOCTL_GETMODE, mode_id);
- pb_log("%s: %u\n", __func__, *mode_id);
+ pb_log_fn("%u\n", *mode_id);
return result;
}
diff --git a/ui/common/timer.c b/ui/common/timer.c
index b0cae0d..23c3e62 100644
--- a/ui/common/timer.c
+++ b/ui/common/timer.c
@@ -35,7 +35,7 @@
void ui_timer_init(struct waitset *waitset, struct ui_timer *timer,
unsigned int seconds)
{
- pb_log("%s: %u\n", __func__, seconds);
+ pb_log_fn("%u\n", seconds);
timer->timeout = seconds;
timer->waitset = waitset;
}
diff --git a/ui/common/ui-system.c b/ui/common/ui-system.c
index 7e04801..02142db 100644
--- a/ui/common/ui-system.c
+++ b/ui/common/ui-system.c
@@ -78,7 +78,7 @@ unsigned int pb_elf_hash(const char *str)
h ^= g >> 24;
h &= ~g;
}
- pb_log("%s: %x\n", __func__, h);
+ pb_log_fn("%x\n", h);
return h;
}
OpenPOWER on IntegriCloud