X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbaylibre-acme%2Fgpio.c;h=c2e6da9d7fce8a715228b639bda3ac3714026f4e;hb=7237e91262251a138cf150f9fcfe7b05d0e5904b;hp=bb6c54d56fff3074fe1387cf645ba4da2e138ff2;hpb=34577da641d836dcf27433fee3c6384565ca7847;p=libsigrok.git diff --git a/src/hardware/baylibre-acme/gpio.c b/src/hardware/baylibre-acme/gpio.c index bb6c54d5..c2e6da9d 100644 --- a/src/hardware/baylibre-acme/gpio.c +++ b/src/hardware/baylibre-acme/gpio.c @@ -36,14 +36,14 @@ static int open_and_write(const gchar *path, const gchar *buf) fd = g_fopen(path, "w"); if (!fd) { - sr_err("Error opening %s: %s", path, strerror(errno)); + sr_err("Error opening %s: %s", path, g_strerror(errno)); return -1; } wr = g_fprintf(fd, "%s", buf); fclose(fd); if (wr < 0) { - sr_err("Error writing to %s: %s", path, strerror(errno)); + sr_err("Error writing to %s: %s", path, g_strerror(errno)); return -1; } @@ -117,7 +117,7 @@ SR_PRIV int sr_gpio_get_value(int gpio) g_string_printf(path, "/sys/class/gpio/gpio%d/value", gpio); fd = g_fopen(path->str, "r"); if (!fd) { - sr_err("Error opening %s: %s", path->str, strerror(errno)); + sr_err("Error opening %s: %s", path->str, g_strerror(errno)); g_string_free(path, TRUE); return -1; } @@ -125,7 +125,7 @@ SR_PRIV int sr_gpio_get_value(int gpio) status = fscanf(fd, "%d", &ret); fclose(fd); if (status != 1) { - sr_err("Error reading from %s: %s", path, strerror(errno)); + sr_err("Error reading from %s: %s", path, g_strerror(errno)); g_string_free(path, TRUE); return -1; }