[Xfce4-commits] [panel-plugins/xfce4-diskperf-plugin] 02/03: Allow for 128 chars device names (bug #15375)
noreply at xfce.org
noreply at xfce.org
Thu May 16 21:49:09 CEST 2019
This is an automated email from the git hooks/post-receive script.
l a n d r y p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-diskperf-plugin.
commit 4db70a239601058e65859eabf8d8e524fa33d141
Author: Landry Breuil <landry at xfce.org>
Date: Thu May 16 21:37:17 2019 +0200
Allow for 128 chars device names (bug #15375)
---
panel-plugin/config_gui.c | 2 +-
panel-plugin/main.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/panel-plugin/config_gui.c b/panel-plugin/config_gui.c
index 50ab3eb..2e79c6b 100644
--- a/panel-plugin/config_gui.c
+++ b/panel-plugin/config_gui.c
@@ -114,7 +114,7 @@ int CreateConfigGUI (GtkWidget * vbox1, struct gui_t *p_poGUI)
gtk_grid_attach (GTK_GRID (table1), wTF_Device, 1, 0, 2, 1);
gtk_widget_set_tooltip_text (wTF_Device,
_("Input the device name, then press <Enter>"));
- gtk_entry_set_max_length (GTK_ENTRY (wTF_Device), 64);
+ gtk_entry_set_max_length (GTK_ENTRY (wTF_Device), 128);
gtk_entry_set_text (GTK_ENTRY (wTF_Device), _("/dev/sda1"));
eventbox1 = gtk_event_box_new ();
diff --git a/panel-plugin/main.c b/panel-plugin/main.c
index 4ebd48d..cf4843a 100644
--- a/panel-plugin/main.c
+++ b/panel-plugin/main.c
@@ -79,7 +79,7 @@ typedef enum monitor_bar_order_t {
typedef struct param_t {
/* Configurable parameters */
- char acDevice[64];
+ char acDevice[128];
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__sun__)
dev_t st_rdev;
#endif
@@ -480,16 +480,16 @@ static diskperf_t *diskperf_create_control (XfcePanelPlugin *plugin)
poPlugin->plugin = plugin;
#if defined(__NetBSD__) || defined(__OpenBSD__)
- strncpy (poConf->acDevice, "wd0", 64);
+ strncpy (poConf->acDevice, "wd0", 128);
strncpy (poConf->acTitle, "wd0", 16);
#elif defined(__FreeBSD__)
- strncpy (poConf->acDevice, "ada0", 64);
+ strncpy (poConf->acDevice, "ada0", 128);
strncpy (poConf->acTitle, "ada0", 16);
#elif defined(__sun__)
- strncpy (poConf->acDevice, "sd0", 64);
+ strncpy (poConf->acDevice, "sd0", 128);
strncpy (poConf->acTitle, "sd0", 16);
#else
- strncpy (poConf->acDevice, "/dev/sda", 64);
+ strncpy (poConf->acDevice, "/dev/sda", 128);
status = stat (poConf->acDevice, &oStat);
poConf->st_rdev = (status == -1 ? 0 : oStat.st_rdev);
strncpy (poConf->acTitle, "sda", 16);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list