/***************************************************************************
*
* hal-storage-zpool.c : ZFS pool methods
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*
**************************************************************************/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <wait.h>
#include <unistd.h>
#include <bsm/adt_event.h>
#include <libhal.h>
#include <libhal-storage.h>
#ifdef HAVE_POLKIT
#include <libpolkit.h>
#endif
#include "hal-storage-shared.h"
static void
usage (void)
{
exit (1);
}
void static
{
exit (1);
}
void
{
return;
}
return;
}
switch (event_id) {
case ADT_pool_export:
break;
case ADT_pool_import:
break;
default:
goto out;
}
if (result == 0) {
}
} else {
}
}
out:
(void) adt_end_session(ah);
}
void
#ifdef HAVE_POLKIT
#endif
const char *invoked_by_uid, const char *invoked_by_syscon_name,
{
int exit_status = 0;
int na;
#ifdef DEBUG
#endif
na = 0;
}
/* invoke eject command */
if (!g_spawn_sync ("/",
args,
NULL,
0,
NULL,
NULL,
&sout,
&serr,
&err)) {
unknown_zpool_error ("Cannot spawn zpool");
}
}
if (exit_status != 0) {
}
}
int
{
char *udi;
char *device;
const char *drive_udi;
#ifdef HAVE_POLKIT
#endif
char *invoked_by_uid;
char *invoked_by_syscon_name;
usage ();
usage ();
dbus_error_init (&error);
printf ("Cannot connect to hald\n");
usage ();
}
dbus_error_init (&error);
if (system_bus == NULL) {
printf ("Cannot connect to the system bus\n");
usage ();
}
#ifdef HAVE_POLKIT
printf ("Cannot get libpolkit context\n");
unknown_zpool_error ("Cannot get libpolkit context");
}
#endif
/* should be a volume */
unknown_zpool_error ("Invalid volume");
}
unknown_zpool_error ("Cannot get drive udi");
}
unknown_zpool_error ("Cannot get drive from udi");
}
unknown_zpool_error ("Not a zpool");
}
unknown_zpool_error ("Invalid zpool name");
}
#ifdef HAVE_POLKIT
#endif
return 0;
}