* path.h (path_conv::set_name): Declare new function.

* path.cc (path_conv::set_name): Define new function.
* fhandler.h (fhandler_dev_null::open): Declare new function.
* fhandler.cc (fhandler_dev_null::open): Define new function.
This commit is contained in:
Christopher Faylor 2005-01-31 21:29:59 +00:00
parent 4faae8d6e9
commit 17dc5be5e9
5 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2005-01-31 Christopher Faylor <cgf@timesys.com>
* path.h (path_conv::set_name): Declare new function.
* path.cc (path_conv::set_name): Define new function.
* fhandler.h (fhandler_dev_null::open): Declare new function.
* fhandler.cc (fhandler_dev_null::open): Define new function.
2005-01-31 Christopher Faylor <cgf@timesys.com>
* smallprint.c (rnarg): Use long rather than unsigned long so that we

View File

@ -1421,6 +1421,15 @@ fhandler_dev_null::dump (void)
paranoid_printf ("here");
}
int
fhandler_dev_null::open (int flags, mode_t mode)
{
char posix[strlen (get_name ()) + 1];
strcpy (posix, get_name ());
pc.set_name ("NUL", posix);
return fhandler_base::open_9x (flags, mode);
}
void
fhandler_base::set_no_inheritance (HANDLE &h, int not_inheriting)
{

View File

@ -951,6 +951,7 @@ class fhandler_dev_null: public fhandler_base
{
public:
fhandler_dev_null ();
int open (int, mode_t);
void dump ();
select_record *select_read (select_record *s);

View File

@ -942,6 +942,15 @@ out:
#endif
}
void
path_conv::set_name (const char *win32, const char *posix)
{
if (!normalized_path_size && normalized_path)
cfree (normalized_path);
strcpy (path, win32);
set_normalized_path (posix, false);
}
path_conv::~path_conv ()
{
if (!normalized_path_size && normalized_path)

View File

@ -191,6 +191,7 @@ class path_conv
{path[0] = '\0';}
~path_conv ();
void set_name (const char *win32, const char *posix);
inline char *get_win32 () { return path; }
PUNICODE_STRING get_nt_native_path (UNICODE_STRING &upath);
operator char *() {return path;}