Beispiel #1
0
static int
mount_local_mkdir (const char *path, mode_t mode)
{
  int r;
  DECL_G ();
  DEBUG_CALL ("%s, 0%o", path, mode);

  if (g->ml_read_only) return -EROFS;

  dir_cache_invalidate (g, path);

  r = guestfs_mkdir_mode (g, path, mode);
  if (r == -1)
    RETURN_ERRNO;

  return 0;
}
Beispiel #2
0
static int
fg_mkdir (const char *path, mode_t mode)
{
  TRACE_CALL ("%s, 0%o", path, mode);

  int r;

  if (read_only) return -EROFS;

  dir_cache_invalidate (path);

  r = guestfs_mkdir_mode (g, path, mode);
  if (r == -1)
    return error ();

  return 0;
}