Lines Matching defs:directory
116 * parent directory by truncation.
173 hal_util_get_int_from_file (const gchar *directory, const gchar *file, gint *result, gint base)
183 g_snprintf (path, sizeof (path), "%s/%s", directory, file);
208 hal_util_set_int_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file, gint base)
215 if (hal_util_get_int_from_file (directory, file, &value, base))
223 hal_util_get_uint64_from_file (const gchar *directory, const gchar *file, guint64 *result, gint base)
233 g_snprintf (path, sizeof (path), "%s/%s", directory, file);
259 hal_util_set_uint64_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file, gint base)
266 if (hal_util_get_uint64_from_file (directory, file, &value, base))
273 hal_util_get_bcd2_from_file (const gchar *directory, const gchar *file, gint *result)
290 g_snprintf (path, sizeof (path), "%s/%s", directory, file);
349 hal_util_set_bcd2_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file)
356 if (hal_util_get_bcd2_from_file (directory, file, &value))
363 hal_util_get_string_from_file (const gchar *directory, const gchar *file)
375 g_snprintf (path, sizeof (path), "%s/%s", directory, file);
410 hal_util_set_string_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file)
417 if ((buf = hal_util_get_string_from_file (directory, file)) != NULL)
479 /** Given a directory and filename, open the file and search for the
483 * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
497 hal_util_grep_file (const gchar *directory, const gchar *file, const gchar *linestart, gboolean reuse)
514 snprintf (filename, sizeof (filename), "%s/%s", directory, file);
516 strncpy (filename, directory, sizeof (filename));
569 hal_util_grep_string_elem_from_file (const gchar *directory, const gchar *file,
581 if (((line = hal_util_grep_file (directory, file, linestart, reuse)) == NULL) || (strlen (line) == 0))
604 hal_util_grep_int_elem_from_file (const gchar *directory, const gchar *file,
613 strvalue = hal_util_grep_string_elem_from_file (directory, file, linestart, elem, reuse);
641 * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
651 const gchar *directory, const gchar *file,
659 if ((value = hal_util_grep_string_elem_from_file (directory, file, linestart, elem, reuse)) == NULL)
681 * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
691 const gchar *directory, const gchar *file,
701 strvalue = hal_util_grep_string_elem_from_file (directory, file, linestart, elem, reuse);
737 * @param directory Directory, e.g. "/proc/acpi/battery/BAT0"
748 const gchar *directory, const gchar *file,
759 if (((line = hal_util_grep_file (directory, file, linestart, reuse)) == NULL) || (strlen (line) == 0))