back into build_fh_name.
(build_fh_name): Drop unused HANDLE parameter. Drop call to pc.fillin.
Remove disabled build_fh_name with UNICODE_STRING name parameter.
* dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
Remove declaration for build_fh_name with UNICODE_STRING name parameter.
* path.cc (path_conv::fillin): Remove.
(symlink_info::check): Fix comment.
* path.h (path_conv::fillin): Remove declaration.
* dir.cc: Accommodate change in build_fh_name parameters throughout.
* sec_acl.cc: Ditto.
* syscalls.cc: Ditto.
* ntea.cc (getxattr_worker): Fix debug output.
(setxattr_worker): Ditto.
* times.cc (utimens_worker): Ditto.
+2010-01-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (build_fh_name_worker): Remove. Move all functionality
+ back into build_fh_name.
+ (build_fh_name): Drop unused HANDLE parameter. Drop call to pc.fillin.
+ Remove disabled build_fh_name with UNICODE_STRING name parameter.
+ * dtable.h (build_fh_name): Drop HANDLE parameter from declaration.
+ Remove declaration for build_fh_name with UNICODE_STRING name parameter.
+ * path.cc (path_conv::fillin): Remove.
+ (symlink_info::check): Fix comment.
+ * path.h (path_conv::fillin): Remove declaration.
+ * dir.cc: Accommodate change in build_fh_name parameters throughout.
+ * sec_acl.cc: Ditto.
+ * syscalls.cc: Ditto.
+
+ * ntea.cc (getxattr_worker): Fix debug output.
+ (setxattr_worker): Ditto.
+ * times.cc (utimens_worker): Ditto.
+
2010-01-11 Corinna Vinschen <corinna@vinschen.de>
* fhandler_proc.cc (format_proc_stat): Use new in_buf.
/* dir.cc: Posix directory-related routines
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006, 2007,
- 2008, 2009 Red Hat, Inc.
+ 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
fhandler_base *fh;
DIR *res;
- fh = build_fh_name (name, NULL, PC_SYM_FOLLOW);
+ fh = build_fh_name (name, PC_SYM_FOLLOW);
if (!fh)
res = NULL;
else if (fh->exists ())
while (p > dir && isdirsep (*p))
*p-- = '\0';
}
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
+ if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
goto done; /* errno already set */;
if (fh->error ())
if (efault.faulted (EFAULT))
return -1;
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
+ if (!(fh = build_fh_name (dir, PC_SYM_NOFOLLOW)))
goto done; /* errno already set */;
if (fh->error ())
/* dtable.cc: file descriptor support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
#define cnew(name) new ((void *) ccalloc (HEAP_FHANDLER, 1, sizeof (name))) name
-static fhandler_base *
-build_fh_name_worker (path_conv& pc, HANDLE h, unsigned opt, suffix_info *si)
+fhandler_base *
+build_fh_name (const char *name, unsigned opt, suffix_info *si)
{
+ path_conv pc (name, opt | PC_NULLEMPTY | PC_POSIX, si);
if (pc.error)
{
fhandler_base *fh = cnew (fhandler_nodevice) ();
return fh;
}
- if (!pc.exists () && h)
- pc.fillin (h);
-
return build_fh_pc (pc);
}
-fhandler_base *
-build_fh_name (const char *name, HANDLE h, unsigned opt, suffix_info *si)
-{
- path_conv pc (name, opt | PC_NULLEMPTY | PC_POSIX, si);
- return build_fh_name_worker (pc, h, opt, si);
-}
-
-#if 0 /* Not needed yet */
-#define cnew(name) new ((void *) ccalloc (HEAP_FHANDLER, 1, sizeof (name))) name
-fhandler_base *
-build_fh_name (const UNICODE_STRING *name, HANDLE h, unsigned opt, suffix_info *si)
-{
- path_conv pc (name, opt | PC_NULLEMPTY | PC_POSIX, si);
- return build_fh_name_worker (pc, h, opt, si);
-}
-#endif
fhandler_base *
build_fh_dev (const device& dev, const char *unix_name)
/* dtable.h: fd table definition.
- Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red
- Hat, Inc.
+ Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+ 2010 Red Hat, Inc.
This file is part of Cygwin.
};
fhandler_base *build_fh_dev (const device&, const char * = NULL);
-fhandler_base *build_fh_name (const char *, HANDLE = NULL, unsigned = 0, suffix_info * = NULL);
-fhandler_base *build_fh_name (const UNICODE_STRING *, HANDLE = NULL, unsigned = 0, suffix_info * = NULL);
+fhandler_base *build_fh_name (const char *, unsigned = 0, suffix_info * = NULL);
fhandler_base *build_fh_pc (path_conv& pc, bool set_name = true);
void dtable_init ();
/* ntea.cc: code for manipulating Extended Attributes
- Copyright 1997, 1998, 2000, 2001, 2006, 2008 Red Hat, Inc.
+ Copyright 1997, 1998, 2000, 2001, 2006, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
if (pc.error)
{
- debug_printf ("got %d error from build_fh_name", pc.error);
+ debug_printf ("got %d error from path_conv", pc.error);
set_errno (pc.error);
}
else if (pc.exists ())
if (pc.error)
{
- debug_printf ("got %d error from build_fh_name", pc.error);
+ debug_printf ("got %d error from path_conv", pc.error);
set_errno (pc.error);
}
else if (pc.exists ())
/* path.cc: path support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
}
void
-path_conv::fillin (HANDLE h)
-{
- IO_STATUS_BLOCK io;
- FILE_BASIC_INFORMATION fbi;
-
- if (NT_SUCCESS (NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
- FileBasicInformation)))
- fileattr = fbi.FileAttributes;
- else
- fileattr = INVALID_FILE_ATTRIBUTES;
-}
-
-void
path_conv::set_normalized_path (const char *path_copy)
{
if (path_copy)
Note that additional STATUS_OBJECT_PATH_INVALID and
STATUS_OBJECT_PATH_SYNTAX_BAD status codes exist. The first one
- is seemingly not generated by NtQueryAttributesFile, the latter
+ is seemingly not generated by NtQueryInformationFile, the latter
is only generated if the path is no absolute path within the
NT name space, which should not happen and would point to an
error in get_nt_native_path. Both status codes are deliberately
/* path.h: path data structures
Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008 Red Hat, Inc.
+ 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
strcpy (new_path, p);
return path = new_path;
}
- void fillin (HANDLE h);
bool is_binary ();
unsigned __stdcall ndisk_links (DWORD);
/* sec_acl.cc: Sun compatible ACL functions.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009, 2010 Red Hat, Inc.
Written by Corinna Vinschen <corinna@vinschen.de>
unsigned fmode)
{
int res = -1;
- fhandler_base *fh = build_fh_name (path, NULL, fmode, stat_suffixes);
+ fhandler_base *fh = build_fh_name (path, fmode, stat_suffixes);
if (fh->error ())
{
debug_printf ("got %d error from build_fh_name", fh->error ());
/* syscalls.cc: syscalls
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
if (fd >= 0)
{
- if (!(fh = build_fh_name (unix_path, NULL,
+ if (!(fh = build_fh_name (unix_path,
(flags & (O_NOFOLLOW | O_EXCL))
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
stat_suffixes)))
int res = -1;
fhandler_base *fh;
- if (!(fh = build_fh_name (oldpath, NULL, PC_SYM_NOFOLLOW, stat_suffixes)))
+ if (!(fh = build_fh_name (oldpath, PC_SYM_NOFOLLOW, stat_suffixes)))
goto error;
if (fh->error ())
int res = -1;
fhandler_base *fh;
- if (!(fh = build_fh_name (name, NULL, fmode, stat_suffixes)))
+ if (!(fh = build_fh_name (name, fmode, stat_suffixes)))
goto error;
if (fh->error ())
{
int res = -1;
fhandler_base *fh;
- if (!(fh = build_fh_name (path, NULL, PC_SYM_FOLLOW, stat_suffixes)))
+ if (!(fh = build_fh_name (path, PC_SYM_FOLLOW, stat_suffixes)))
goto error;
if (fh->error ())
if (pc.error)
{
- debug_printf ("got %d error from build_fh_name", pc.error);
+ debug_printf ("got %d error from path_conv", pc.error);
set_errno (pc.error);
}
else if (pc.exists ())
set_errno (EINVAL);
else
{
- fhandler_base *fh = build_fh_name (fn, NULL, PC_SYM_FOLLOW, stat_suffixes);
+ fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW, stat_suffixes);
if (fh)
{
res = fh->fhaccess (flags, false);
set_errno (EINVAL);
else
{
- fhandler_base *fh = build_fh_name (fn, NULL, PC_SYM_FOLLOW, stat_suffixes);
+ fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW, stat_suffixes);
if (fh)
{
res = fh->fhaccess (flags, true);
set_errno (ENOENT);
return -1;
}
- if (!(fh = build_fh_name (file, NULL, PC_SYM_FOLLOW, stat_suffixes)))
+ if (!(fh = build_fh_name (file, PC_SYM_FOLLOW, stat_suffixes)))
return -1;
if (!fh->exists ())
set_errno (ENOENT);
if (efault.faulted (EFAULT))
goto error;
- if (!(fh = build_fh_name (name, NULL, PC_SYM_FOLLOW, stat_suffixes)))
+ if (!(fh = build_fh_name (name, PC_SYM_FOLLOW, stat_suffixes)))
goto error;
if (fh->error ())
set_errno (EINVAL);
else
{
- fhandler_base *fh = build_fh_name (path, NULL,
+ fhandler_base *fh = build_fh_name (path,
(flags & AT_SYMLINK_NOFOLLOW)
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
stat_suffixes);
/* times.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009 Red Hat, Inc.
+ 2005, 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
if (fh->error ())
{
- debug_printf ("got %d error from build_fh_name", fh->error ());
+ debug_printf ("got %d error from build_fh_pc", fh->error ());
set_errno (fh->error ());
}
}