1999-09-13 Owen Taylor <otaylor@redhat.com>

* Makefile.in (MAGICDEV_OBJS): Built common/stubs
	for magicdev if we found it.

	* gmount.c (automounter_is_running): If we detected
	magicdev support at compile time, use a CORBA query
	to detect if it is running.

	* gcorba.c (WindowFactory_get_windows_by_directory): Set the
	length of the sequence we are returning.

	* gmount.c (setup_devices): is_block_device_mounted expects
	mount point, not device.
This commit is contained in:
Owen Taylor 1999-09-14 05:21:39 +00:00
parent 2946355856
commit d42d8d60eb
4 changed files with 67 additions and 5 deletions

View File

@ -1,3 +1,18 @@
1999-09-13 Owen Taylor <otaylor@redhat.com>
* Makefile.in (MAGICDEV_OBJS): Built common/stubs
for magicdev if we found it.
* gmount.c (automounter_is_running): If we detected
magicdev support at compile time, use a CORBA query
to detect if it is running.
* gcorba.c (WindowFactory_get_windows_by_directory): Set the
length of the sequence we are returning.
* gmount.c (setup_devices): is_block_device_mounted expects
mount point, not device.
1999-09-13 Miguel de Icaza <miguel@gnu.org>
* glayout.c: Add C-w for sopwith.

View File

@ -15,6 +15,7 @@ EXTRALIBS = -L../vfs @LVFS@ -L../gtkedit -lgtkedit @LINTL@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
GNOME_IDLDIR = @GNOME_IDLDIR@
PIXMAPS = \
dev.xpm \
@ -138,6 +139,8 @@ OOBJS = dlg.o screen.o widget.o wtools.o info.o boxes.o \
CORBAOBJS = \
main-corba.o \
gcorba.o \
gmount-corba.o \
$(MAGICDEV_OBJS) \
FileManager-skels.o \
FileManager-stubs.o \
FileManager-common.o
@ -161,7 +164,6 @@ OBJS = \
gkey.o \
glayout.o \
gmain.o \
gmount.o \
gmc-chargrid.o \
gmenu.o \
gmetadata.o \
@ -182,7 +184,8 @@ OBJS = \
gtkflist.o \
gwidget.o
NORMALOBJS = \
NORMALOBJS = \
gmount.o \
main.o
CORBA_GENERATED = \
@ -191,6 +194,14 @@ CORBA_GENERATED = \
FileManager-skels.c \
FileManager-common.c
MAGICDEV_GENERATED = \
magicdev-common.c \
magicdev-stubs.c
@MAGICDEV@MAGICDEV_OBJS = \
@MAGICDEV@ magicdev-common.o \
@MAGICDEV@ magicdev-stubs.o
CLIENTSRCS = gmc-client.c
CLIENTOBJS = \
@ -202,6 +213,9 @@ CLIENTOBJS = \
$(CORBA_GENERATED): $(rootdir)/idl/FileManager.idl
orbit-idl `gnome-config --cflags idl` $(rootdir)/idl/FileManager.idl
@MAGICDEV@$(MAGICDEV_GENERATED): $(GNOME_IDLDIR)/magicdev.idl
@MAGICDEV@ orbit-idl `gnome-config --cflags idl` --noskels $(GNOME_IDLDIR)/magicdev.idl
FileManager-impl.c: FileManager.h
EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in gimp.image.desktop
@ -220,7 +234,11 @@ DISTGNOME = \
main-corba.o: main.c
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o main-corba.o
gmount-corba.o: gmount.c
$(CC) -c -DHAVE_CORBA $(CPPFLAGS) $(DEFS) $(CFLAGS) $< -o gmount-corba.o
gcorba.o: gcorba.c $(CORBA_GENERATED)
gmount.o: gmount.c $(MAGICDEV_GENERATED)
all: @mx@ Makefile mc.keys

View File

@ -321,6 +321,7 @@ WindowFactory_get_windows_by_directory (PortableServer_Servant servant,
}
seq = GNOME_FileManager_WindowFactory_WindowSeq__alloc ();
seq->_length = n;
seq->_buffer = CORBA_sequence_GNOME_FileManager_Window_allocbuf (n);
for (l = containers, i = 0; l; l = l->next, i++) {

View File

@ -84,6 +84,11 @@ void free (void *ptr);
#define MOUNTED_GETMNTTBL
#endif
#ifdef HAVE_MAGICDEV
#include <libgnorba/gnorba.h>
#include "magicdev.h"
#endif /* HAVE_MAGICDEV */
#include <dirent.h>
#include <sys/types.h>
#include <unistd.h>
@ -284,8 +289,31 @@ mount_point_to_device (char *mount_point)
static gboolean
automounter_is_running (void)
{
/* FIXME: finish this when magicdev is finished */
return TRUE;
#if defined(HAVE_MAGICDEV) && defined(HAVE_CORBA)
CORBA_Object server;
CORBA_Environment ev;
gboolean result = FALSE;
CORBA_exception_init (&ev);
server = goad_server_activate_with_id (NULL,
"GOAD:magicdev:19990913",
GOAD_ACTIVATE_EXISTING_ONLY,
NULL);
if (!CORBA_Object_is_nil (server, &ev)) {
result = GNOME_MagicDev_is_running (server, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
result = FALSE;
CORBA_Object_release (server, &ev);
}
return result;
#else /* !HAVE_MAGICDEV */
return FALSE;
#endif /* HAVE_MAGICDEV */
}
@ -404,7 +432,7 @@ setup_devices (void)
* be nice and create only the links for CD-ROMS that
* are actually mounted.
*/
if (automounter && !is_block_device_mounted (dev_name))
if (automounter && !is_block_device_mounted (dit->mount_point))
do_create = FALSE;
} else if (strncmp (short_dev_name, "fd", 2) == 0) {
format = _("Floppy %d");