hal/hald Makefile.am, 1.49, 1.50 hald.c, 1.36, 1.37 util.c, 1.16,
1.17 util.h, 1.9, 1.10
David Zeuthen
david at freedesktop.org
Thu Jun 23 07:50:08 PDT 2005
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv4965/hald
Modified Files:
Makefile.am hald.c util.c util.h
Log Message:
2005-06-23 David Zeuthen <davidz at redhat.com>
Patch from Alvaro Lopez Ortega <alvaro at sun.com> to add an empty
Solaris backend to HAL.
* hald/solaris/osspec.c: New file
* hald/solaris/Makefile.am: New file
* configure.in: Add checks for Solaris
Index: Makefile.am
===================================================================
RCS file: /cvs/hal/hal/hald/Makefile.am,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- Makefile.am 27 May 2005 22:53:28 -0000 1.49
+++ Makefile.am 23 Jun 2005 14:50:04 -0000 1.50
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = dummy linux2 .
+SUBDIRS = dummy linux2 solaris .
INCLUDES = \
-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
Index: hald.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- hald.c 10 Jun 2005 14:36:10 -0000 1.36
+++ hald.c 23 Jun 2005 14:50:04 -0000 1.37
@@ -38,7 +38,6 @@
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
-#include <sys/prctl.h>
#include <grp.h>
#include <syslog.h>
Index: util.c
===================================================================
RCS file: /cvs/hal/hal/hald/util.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- util.c 11 May 2005 17:46:32 -0000 1.16
+++ util.c 23 Jun 2005 14:50:04 -0000 1.17
@@ -30,7 +30,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
-#include <mntent.h>
#include <errno.h>
#include <ctype.h>
#include <sys/types.h>
@@ -100,52 +99,6 @@
return TRUE;
}
-gboolean
-hal_util_get_fs_mnt_path (const gchar *fs_type, gchar *mnt_path, gsize len)
-{
- FILE *mnt;
- struct mntent *mntent;
- gboolean rc;
- gsize dirlen;
-
- rc = FALSE;
- dirlen = 0;
-
- if (fs_type == NULL || mnt_path == NULL || len == 0) {
- HAL_ERROR (("Arguments not sane"));
- return -1;
- }
-
- if ((mnt = setmntent ("/proc/mounts", "r")) == NULL) {
- HAL_ERROR (("Error getting mount information"));
- return -1;
- }
-
- while (rc == FALSE && dirlen == 0 && (mntent = getmntent(mnt)) != NULL) {
- if (strcmp (mntent->mnt_type, fs_type) == 0) {
- dirlen = strlen (mntent->mnt_dir);
- if (dirlen <= (len - 1)) {
- g_strlcpy (mnt_path, mntent->mnt_dir, len);
- rc = TRUE;
- } else {
- HAL_ERROR (("Error - mount path too long"));
- rc = FALSE;
- }
- }
- }
- endmntent (mnt);
-
- if (dirlen == 0 && rc == TRUE) {
- HAL_ERROR (("Filesystem %s not found", fs_type));
- rc = FALSE;
- }
-
- if ((!hal_util_remove_trailing_slash (mnt_path)))
- rc = FALSE;
-
- return rc;
-}
-
/** Given a path, /foo/bar/bat/foobar, return the last element, e.g.
* foobar.
*
Index: util.h
===================================================================
RCS file: /cvs/hal/hal/hald/util.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- util.h 11 May 2005 17:46:32 -0000 1.9
+++ util.h 23 Jun 2005 14:50:04 -0000 1.10
@@ -33,8 +33,6 @@
gboolean hal_util_remove_trailing_slash (gchar *path);
-gboolean hal_util_get_fs_mnt_path (const gchar *fs_type, gchar *mnt_path, gsize len);
-
const gchar *hal_util_get_last_element (const gchar *s);
gchar *hal_util_get_parent_path (const gchar *path);
More information about the hal-commit
mailing list