summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Pyhalov <apyhalov@gmail.com>2020-02-06 13:02:44 +0300
committerDan McDonald <danmcd@joyent.com>2020-02-21 14:01:41 -0500
commitb877e47f88a401dbef6fff48940d38855c01fcbc (patch)
treeaf631a70c0f29fc79a56227c4e49bb4113f2fa06
parentb2d2f356e1abcc2a19572314b5084b7b87050604 (diff)
downloadillumos-joyent-b877e47f88a401dbef6fff48940d38855c01fcbc.tar.gz
12316 hald_runner dies getting SIGPIPE
Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/hal/hald/solaris/devinfo_storage.c9
-rw-r--r--usr/src/cmd/hal/tools/hal-storage-mount.c2
2 files changed, 3 insertions, 8 deletions
diff --git a/usr/src/cmd/hal/hald/solaris/devinfo_storage.c b/usr/src/cmd/hal/hald/solaris/devinfo_storage.c
index bfe027ad25..d1fea0c577 100644
--- a/usr/src/cmd/hal/hald/solaris/devinfo_storage.c
+++ b/usr/src/cmd/hal/hald/solaris/devinfo_storage.c
@@ -1522,19 +1522,17 @@ devinfo_storage_mnttab_event (HalDevice *hal_volume)
/* cleanup if was mounted by us */
if (hal_util_is_mounted_by_hald (mount_point)) {
- char *cleanup_stdin;
char *extra_env[2];
HAL_INFO (("Cleaning up '%s'", mount_point));
extra_env[0] = g_strdup_printf ("HALD_CLEANUP=%s", mount_point);
extra_env[1] = NULL;
- cleanup_stdin = "\n";
hald_runner_run_method (d,
"hal-storage-cleanup-mountpoint",
extra_env,
- cleanup_stdin, TRUE,
+ "", TRUE,
0,
devinfo_storage_cleanup_mountpoint_cb,
g_strdup (mount_point), NULL);
@@ -1577,7 +1575,6 @@ static void
devinfo_volume_force_unmount (HalDevice *d, void *end_token)
{
const char *mount_point;
- char *unmount_stdin;
char *extra_env[2];
extra_env[0] = "HAL_METHOD_INVOKED_BY_UID=0";
extra_env[1] = NULL;
@@ -1591,12 +1588,10 @@ devinfo_volume_force_unmount (HalDevice *d, void *end_token)
HAL_INFO (("devinfo_volume_force_unmount for udi='%s'", hal_device_get_udi (d)));
- unmount_stdin = "\n";
-
hald_runner_run_method (d,
"hal-storage-unmount",
extra_env,
- unmount_stdin, TRUE,
+ "", TRUE,
0,
devinfo_volume_force_unmount_cb,
end_token, NULL);
diff --git a/usr/src/cmd/hal/tools/hal-storage-mount.c b/usr/src/cmd/hal/tools/hal-storage-mount.c
index 5622123274..5e687bea9e 100644
--- a/usr/src/cmd/hal/tools/hal-storage-mount.c
+++ b/usr/src/cmd/hal/tools/hal-storage-mount.c
@@ -228,7 +228,7 @@ canonicalize_filename (gchar *filename)
static char *
resolve_symlink (const char *file)
{
- GError *error;
+ GError *error = NULL;
char *dir;
char *link;
char *f;