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

[Xen-changelog] bool type doesn't exist in C, don't try to emulate one.



# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID f1fc94516c4c21ca69212d2dbdea2fd93f9ab678
# Parent  927cd2e4f150b078e04a27b540469e3e21c792e8
bool type doesn't exist in C, don't try to emulate one.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 927cd2e4f150 -r f1fc94516c4c 
linux-2.6-xen-sparse/drivers/xen/tpmback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Mon Jan 16 22:07:29 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/common.h Mon Jan 16 22:11:43 2006
@@ -76,11 +76,6 @@
 
 #define MMAP_VADDR(t,_req) ((t)->mmap_vstart + ((_req) * PAGE_SIZE))
 
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
-
 #endif /* __TPMIF__BACKEND__COMMON_H__ */
 
 /*
diff -r 927cd2e4f150 -r f1fc94516c4c 
linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Mon Jan 16 22:07:29 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c Mon Jan 16 22:11:43 2006
@@ -78,7 +78,7 @@
 
        memset(be, 0, sizeof(*be));
 
-       be->is_instance_set = FALSE;
+       be->is_instance_set = 0;
        be->dev = dev;
        dev->data = be;
 
@@ -120,7 +120,7 @@
                return;
        }
 
-       if (be->is_instance_set != FALSE && be->instance != instance) {
+       if (be->is_instance_set != 0 && be->instance != instance) {
                printk(KERN_WARNING
                       "tpmback: changing instance (from %ld to %ld) "
                       "not allowed.\n",
@@ -128,7 +128,7 @@
                return;
        }
 
-       if (be->is_instance_set == FALSE) {
+       if (be->is_instance_set == 0) {
                be->tpmif = tpmif_find(dev->otherend_id,
                                       instance);
                if (IS_ERR(be->tpmif)) {
@@ -138,7 +138,7 @@
                        return;
                }
                be->instance = instance;
-               be->is_instance_set = TRUE;
+               be->is_instance_set = 1;
 
                /*
                 * There's an unfortunate problem:
diff -r 927cd2e4f150 -r f1fc94516c4c 
linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c      Mon Jan 16 
22:07:29 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.c      Mon Jan 16 
22:11:43 2006
@@ -241,7 +241,7 @@
 
 static void destroy_tpmring(struct tpmfront_info *info, struct tpm_private *tp)
 {
-       tpmif_set_connected_state(tp, FALSE);
+       tpmif_set_connected_state(tp, 0);
        if ( tp->tx != NULL ) {
                gnttab_end_foreign_access(info->ring_ref, 0,
                                          (unsigned long)tp->tx);
@@ -329,15 +329,15 @@
                break;
 
        case XenbusStateConnected:
-               tpmif_set_connected_state(tp, TRUE);
+               tpmif_set_connected_state(tp, 1);
                break;
 
        case XenbusStateClosing:
-               tpmif_set_connected_state(tp, FALSE);
+               tpmif_set_connected_state(tp, 0);
                break;
 
        case XenbusStateClosed:
-               if (tp->is_suspended == FALSE) {
+               if (tp->is_suspended == 0) {
                        device_unregister(&dev->dev);
                }
                break;
@@ -401,7 +401,7 @@
 
        /* lock, so no app can send */
        down(&suspend_lock);
-       tp->is_suspended = TRUE;
+       tp->is_suspended = 1;
 
        while (atomic_read(&tp->tx_busy) && ctr <= 25) {
                if ((ctr % 10) == 0)
@@ -571,7 +571,7 @@
                return -EBUSY;
        }
 
-       if (tp->is_connected != TRUE) {
+       if (tp->is_connected != 1) {
                spin_unlock_irq(&tp->tx_lock);
                return -EIO;
        }
@@ -660,7 +660,7 @@
         * should disconnect - assumption is that we will resume
         * The semaphore keeps apps from sending.
         */
-       if (is_connected == FALSE && tp->is_suspended == TRUE) {
+       if (is_connected == 0 && tp->is_suspended == 1) {
                return;
        }
 
@@ -669,8 +669,8 @@
         * after being suspended - now resuming.
         * This also removes the suspend state.
         */
-       if (is_connected == TRUE && tp->is_suspended == TRUE) {
-               tp->is_suspended = FALSE;
+       if (is_connected == 1 && tp->is_suspended == 1) {
+               tp->is_suspended = 0;
                /* unlock, so apps can resume sending */
                up(&suspend_lock);
        }
diff -r 927cd2e4f150 -r f1fc94516c4c 
linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h
--- a/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h      Mon Jan 16 
22:07:29 2006
+++ b/linux-2.6-xen-sparse/drivers/xen/tpmfront/tpmfront.h      Mon Jan 16 
22:11:43 2006
@@ -1,10 +1,5 @@
 #ifndef TPM_FRONT_H
 #define TPM_FRONT_H
-
-#ifndef TRUE
-#define TRUE 1
-#define FALSE 0
-#endif
 
 struct tpm_private {
        tpmif_tx_interface_t *tx;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.