openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/dbus/1.12.16-r0/dbus-1.12.16/dbus/dbus-sysdeps-unix.c
dbus_bool_t _dbus_ensure_directory(const DBusString* filename, DBusError* error)
{
    const char* filename_c;

    _DBUS_ASSERT_ERROR_IS_CLEAR(error);

    filename_c = _dbus_string_get_const_data(filename);

    if (mkdir(filename_c, 0700) < 0)
    {
        if (errno == EEXIST)
            return TRUE;

        dbus_set_error(error, DBUS_ERROR_FAILED,
                       "Failed to create directory %s: %s\n", filename_c,
                       _dbus_strerror(errno));
        return FALSE;
    }
    else
        return TRUE;
}
/**
 * Creates a directory; succeeds if the directory
 * is created or already existed.
 *
 * @param filename directory filename
 * @param error initialized error object
 * @returns #TRUE on success
 */
Creates a directory; succeeds if the directory
is created or already existed.

@param filename directory filename
@param error initialized error object
@returns #TRUE on success
Creates a directory ; succeeds if the directory is created or already existed . @param filename directory filename @param error initialized error object @returns #TRUE on success
dbus_bool_t _dbus_ensure_directory(const DBusString* filename, DBusError* error)
{
    const char* filename_c;
    _DBUS_ASSERT_ERROR_IS_CLEAR(error);
    filename_c = _dbus_string_get_const_data(filename);
    if (mkdir(filename_c, 0700) < 0)
    {
        if (errno == EEXIST)
            return TRUE;
        dbus_set_error(error, DBUS_ERROR_FAILED,
                       "Failed to create directory %s: %s\n", filename_c,
                       _dbus_strerror(errno));
        return FALSE;
    }
    else
        return TRUE;
}
dbus_bool_t _dbus_ensure_directory ( const DBusString * filename , DBusError * error ) { const char * filename_c ; _DBUS_ASSERT_ERROR_IS_CLEAR ( error ) ; filename_c = _dbus_string_get_const_data ( filename ) ; if ( mkdir ( filename_c , 0700 ) < 0 ) { if ( errno == EEXIST ) return TRUE ; dbus_set_error ( error , DBUS_ERROR_FAILED , " \n " , filename_c , _dbus_strerror ( errno ) ) ; return FALSE ; } else return TRUE ; }
Creates a directory; succeeds if the directory
 is created or already existed.
Creates a directory ; succeeds if the directory is created or already existed .