* fhandler_tape.cc (mtinfo::initialize): Remove synchronization stuff.
Just initialize drive data. * mtinfo.h (MTINFO_MAGIC): Remove. (MTINFO_VERSION): Remove. (class mtinfo): Remove magic and version members. * shared.cc (shared_info::initialize): Move call to get_session_parent_dir so that the dir creation is only called once. Move call to mt.initialize so that it's called only by the first process creating the shared memory. * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info. (CURR_SHARED_MAGIC): Ditto. (class shared_info): Add obcaseinsensitivity member.
This commit is contained in:
parent
dc4b5caedc
commit
80f6f52cb1
@ -1,3 +1,18 @@
|
|||||||
|
2008-07-15 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_tape.cc (mtinfo::initialize): Remove synchronization stuff.
|
||||||
|
Just initialize drive data.
|
||||||
|
* mtinfo.h (MTINFO_MAGIC): Remove.
|
||||||
|
(MTINFO_VERSION): Remove.
|
||||||
|
(class mtinfo): Remove magic and version members.
|
||||||
|
* shared.cc (shared_info::initialize): Move call to
|
||||||
|
get_session_parent_dir so that the dir creation is only called once.
|
||||||
|
Move call to mt.initialize so that it's called only by the first
|
||||||
|
process creating the shared memory.
|
||||||
|
* shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info.
|
||||||
|
(CURR_SHARED_MAGIC): Ditto.
|
||||||
|
(class shared_info): Add obcaseinsensitivity member.
|
||||||
|
|
||||||
2008-07-14 Corinna Vinschen <corinna@vinschen.de>
|
2008-07-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler.cc (fhandler_base::fpathconf): On _PC_POSIX_PERMISSIONS
|
* fhandler.cc (fhandler_base::fpathconf): On _PC_POSIX_PERMISSIONS
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
|
/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
|
||||||
classes.
|
classes.
|
||||||
|
|
||||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
|
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||||
|
2008 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -1125,33 +1126,8 @@ mtinfo_drive::ioctl (HANDLE mt, unsigned int cmd, void *buf)
|
|||||||
void
|
void
|
||||||
mtinfo::initialize ()
|
mtinfo::initialize ()
|
||||||
{
|
{
|
||||||
char name[MAX_PATH];
|
for (unsigned i = 0; i < MAX_DRIVE_NUM; ++i)
|
||||||
HANDLE mtx;
|
drive (i)->initialize (i, true);
|
||||||
|
|
||||||
shared_name (name, "mtinfo_mutex", 0);
|
|
||||||
if (!(mtx = CreateMutex (&sec_all_nih, FALSE, name)))
|
|
||||||
api_fatal ("CreateMutex '%s', %E. Terminating.", name);
|
|
||||||
WaitForSingleObject (mtx, INFINITE);
|
|
||||||
if (!magic)
|
|
||||||
{
|
|
||||||
magic = MTINFO_MAGIC;
|
|
||||||
version = MTINFO_VERSION;
|
|
||||||
for (unsigned i = 0; i < MAX_DRIVE_NUM; ++i)
|
|
||||||
drive (i)->initialize (i, true);
|
|
||||||
ReleaseMutex (mtx);
|
|
||||||
CloseHandle (mtx);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ReleaseMutex (mtx);
|
|
||||||
CloseHandle (mtx);
|
|
||||||
if (magic != MTINFO_MAGIC)
|
|
||||||
api_fatal ("MT magic number screwed up: %lu, should be %lu",
|
|
||||||
magic, MTINFO_MAGIC);
|
|
||||||
if (version != MTINFO_VERSION)
|
|
||||||
system_printf ("MT version number mismatch: %lu, should be %lu",
|
|
||||||
version, MTINFO_VERSION);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************/
|
/**********************************************************************/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* mtinfo.h: Defininitions for the Cygwin tape driver class.
|
/* mtinfo.h: Defininitions for the Cygwin tape driver class.
|
||||||
|
|
||||||
Copyright 2004, 2005, 2006 Red Hat, Inc.
|
Copyright 2004, 2005, 2006, 2008 Red Hat, Inc.
|
||||||
|
|
||||||
This file is part of Cygwin.
|
This file is part of Cygwin.
|
||||||
|
|
||||||
@ -8,9 +8,6 @@ This software is a copyrighted work licensed under the terms of the
|
|||||||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
details. */
|
details. */
|
||||||
|
|
||||||
#define MTINFO_MAGIC 0x179b2af0
|
|
||||||
#define MTINFO_VERSION 2
|
|
||||||
|
|
||||||
/* Maximum number of supported partitions per drive. */
|
/* Maximum number of supported partitions per drive. */
|
||||||
#define MAX_PARTITION_NUM 64
|
#define MAX_PARTITION_NUM 64
|
||||||
/* Maximum number of supported drives. */
|
/* Maximum number of supported drives. */
|
||||||
@ -132,8 +129,6 @@ public:
|
|||||||
|
|
||||||
class mtinfo
|
class mtinfo
|
||||||
{
|
{
|
||||||
DWORD magic;
|
|
||||||
DWORD version;
|
|
||||||
mtinfo_drive _drive[MAX_DRIVE_NUM];
|
mtinfo_drive _drive[MAX_DRIVE_NUM];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -256,17 +256,15 @@ shared_info::initialize ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
heap_init ();
|
heap_init ();
|
||||||
|
get_session_parent_dir (); /* Create session dir if first process. */
|
||||||
|
|
||||||
if (!sversion)
|
if (!sversion)
|
||||||
{
|
{
|
||||||
tty.init (); /* Initialize tty table. */
|
tty.init (); /* Initialize tty table. */
|
||||||
|
mt.initialize (); /* Initialize shared tape information. */
|
||||||
cb = sizeof (*this); /* Do last, after all shared memory initialization */
|
cb = sizeof (*this); /* Do last, after all shared memory initialization */
|
||||||
}
|
}
|
||||||
|
|
||||||
mt.initialize (); /* Initialize shared tape information. */
|
|
||||||
|
|
||||||
get_session_parent_dir (); /* Create session dir if first process. */
|
|
||||||
|
|
||||||
if (cb != SHARED_INFO_CB)
|
if (cb != SHARED_INFO_CB)
|
||||||
system_printf ("size of shared memory region changed from %u to %u",
|
system_printf ("size of shared memory region changed from %u to %u",
|
||||||
SHARED_INFO_CB, cb);
|
SHARED_INFO_CB, cb);
|
||||||
|
@ -118,9 +118,9 @@ public:
|
|||||||
cygwin_version.api_minor)
|
cygwin_version.api_minor)
|
||||||
#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
|
#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
|
||||||
|
|
||||||
#define SHARED_INFO_CB 31144
|
#define SHARED_INFO_CB 31136
|
||||||
|
|
||||||
#define CURR_SHARED_MAGIC 0xbc77afb0U
|
#define CURR_SHARED_MAGIC 0xace17c0fU
|
||||||
|
|
||||||
/* NOTE: Do not make gratuitous changes to the names or organization of the
|
/* NOTE: Do not make gratuitous changes to the names or organization of the
|
||||||
below class. The layout is checksummed to determine compatibility between
|
below class. The layout is checksummed to determine compatibility between
|
||||||
@ -136,6 +136,7 @@ class shared_info
|
|||||||
DWORD sys_mount_table_counter;
|
DWORD sys_mount_table_counter;
|
||||||
tty_list tty;
|
tty_list tty;
|
||||||
LONG last_used_bindresvport;
|
LONG last_used_bindresvport;
|
||||||
|
DWORD obcaseinsensitivity;
|
||||||
mtinfo mt;
|
mtinfo mt;
|
||||||
|
|
||||||
void initialize ();
|
void initialize ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user