bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] No consume flag.


From: Neal H Walfield
Subject: [patch] No consume flag.
Date: Fri, 24 Aug 2001 14:06:18 +0200
User-agent: Mutt/1.3.18i

As discussed offline, we should not have a consume flag; the caller
created the object, it is therefore his responsibility to free it.

2001-08-24  Neal H Walfield  <address@hidden>

        * include/parted/device_gnu.h (ped_device_new_from_store):
        Remove the consume flag.
        * libparted/device_gnu.c (ped_device_new_from_store): Likewise.

diff -x build -x Makefile.in -x config.h.in -x configure -upr 
parted-1.5.4-pre3.orig/include/parted/device_gnu.h 
parted-1.5.4-pre3/include/parted/device_gnu.h
--- parted-1.5.4-pre3.orig/include/parted/device_gnu.h  Thu Aug 23 02:02:06 2001
+++ parted-1.5.4-pre3/include/parted/device_gnu.h       Fri Aug 24 13:54:40 2001
@@ -31,10 +31,11 @@ struct _GNUSpecific {
        int consume;
 };
 
-/* Initialize a PedDevice useing SOURCE.  The device store will be destoyed
-   when ped_device_destory is called if CONSUME is true.  This device is
-   not registered in Parted's list of devices.  */
-PedDevice* ped_device_new_from_store (struct store *source, int consume);
+/* Initialize a PedDevice using SOURCE.  The SOURCE will NOT be destroyed;
+   the caller created it, it is the caller's responsilbility to free it
+   after it calls ped_device_destory.  SOURCE is not registered in Parted's
+   list of devices.  */
+PedDevice* ped_device_new_from_store (struct store *source);
 
 #endif /* PED_DEVICE_GNU_H_INCLUDED */
 
Only in parted-1.5.4-pre3/include/parted: device_gnu.h~
diff -x build -x Makefile.in -x config.h.in -x configure -upr 
parted-1.5.4-pre3.orig/libparted/device_gnu.c 
parted-1.5.4-pre3/libparted/device_gnu.c
--- parted-1.5.4-pre3.orig/libparted/device_gnu.c       Thu Aug 23 02:02:07 2001
+++ parted-1.5.4-pre3/libparted/device_gnu.c    Fri Aug 24 13:50:44 2001
@@ -274,7 +274,7 @@ _arch_device_new (const char* path)
 }
 
 PedDevice*
-ped_device_new_from_store (struct store *source, int consume)
+ped_device_new_from_store (struct store *source)
 {
         PedDevice*      dev;
        GNUSpecific*    arch_specific;
@@ -287,7 +287,7 @@ ped_device_new_from_store (struct store 
 
        arch_specific = GNU_SPECIFIC (dev);
        arch_specific->store = source;
-       arch_specific->consume = consume;
+       arch_specific->consume = 0;
 
        dev->read_only = source->flags & (STORE_READONLY|STORE_HARD_READONLY);
 

Attachment: pgp_f3v20Kcm3.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]