summaryrefslogtreecommitdiffstats
path: root/os_specific/service_layers/osunixdir.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2010-10-13 20:35:34 +0000
committerjkim <jkim@FreeBSD.org>2010-10-13 20:35:34 +0000
commit7af726f5cc604d3fcd32200efde74ce8464d8dbe (patch)
tree8b4567d2d969b27d3900a41337a0ad389480eae7 /os_specific/service_layers/osunixdir.c
parentc5863557e158eb3876688e611d5915c27657e18a (diff)
downloadFreeBSD-src-7af726f5cc604d3fcd32200efde74ce8464d8dbe.zip
FreeBSD-src-7af726f5cc604d3fcd32200efde74ce8464d8dbe.tar.gz
Import ACPICA 20101013.
Diffstat (limited to 'os_specific/service_layers/osunixdir.c')
-rw-r--r--os_specific/service_layers/osunixdir.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/os_specific/service_layers/osunixdir.c b/os_specific/service_layers/osunixdir.c
index 897d173..c3735a6 100644
--- a/os_specific/service_layers/osunixdir.c
+++ b/os_specific/service_layers/osunixdir.c
@@ -125,6 +125,9 @@
#include "acpisrc.h"
+/*
+ * Allocated structure returned from OsOpenDirectory
+ */
typedef struct ExternalFindInfo
{
char *DirPathname;
@@ -193,7 +196,7 @@ AcpiOsOpenDirectory (
*
* PARAMETERS: DirHandle - Created via AcpiOsOpenDirectory
*
- * RETURN: Next filename matched. NULL if no more matches.
+ * RETURN: Next filename matched. NULL if no more matches.
*
* DESCRIPTION: Get the next file in the directory that matches the wildcard
* specification.
@@ -217,7 +220,9 @@ AcpiOsGetNextFilename (
if (!fnmatch (ExternalInfo->WildcardSpec, dir_entry->d_name, 0))
{
if (dir_entry->d_name[0] == '.')
+ {
continue;
+ }
str_len = strlen (dir_entry->d_name) +
strlen (ExternalInfo->DirPathname) + 2;
@@ -226,7 +231,7 @@ AcpiOsGetNextFilename (
if (!temp_str)
{
printf ("Could not allocate buffer for temporary string\n");
- return NULL;
+ return (NULL);
}
strcpy (temp_str, ExternalInfo->DirPathname);
@@ -238,7 +243,7 @@ AcpiOsGetNextFilename (
if (err == -1)
{
printf ("stat() error - should not happen\n");
- return NULL;
+ return (NULL);
}
if ((S_ISDIR (temp_stat.st_mode)
@@ -255,7 +260,7 @@ AcpiOsGetNextFilename (
}
}
- return NULL;
+ return (NULL);
}
@@ -284,10 +289,22 @@ AcpiOsCloseDirectory (
free (DirHandle);
}
+
/* Other functions acpisrc uses but that aren't standard on Unix */
-/* lowercase a string */
-char*
+/*******************************************************************************
+ *
+ * FUNCTION: strlwr
+ *
+ * PARAMETERS: str - String to be lowercased.
+ *
+ * RETURN: str.
+ *
+ * DESCRIPTION: Lowercase a string in-place.
+ *
+ ******************************************************************************/
+
+char *
strlwr (
char *str)
{
OpenPOWER on IntegriCloud