]> www.infradead.org Git - mtd-utils.git/commitdiff
ubi-utils: do not interfer with system namespace
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 29 Aug 2007 13:01:26 +0000 (16:01 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Wed, 29 Aug 2007 14:34:18 +0000 (17:34 +0300)
Rename __unused to ubi_unused to avoid clashes with system namespace

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ubi-utils/src/bootenv.c
ubi-utils/src/config.h
ubi-utils/src/libpfiflash.c
ubi-utils/src/libubigen.c
ubi-utils/src/libubiold_sysfs.c

index 561d4734984b321d9d4bc8f3a7af40ea90391fa3..a6dd4dea564143fd7a8c96723b0fa7c359791856 100644 (file)
@@ -33,7 +33,7 @@
 #include <mtd/ubi-header.h>
 #include "crc32.h"
 
-#define __unused __attribute__((unused))
+#define ubi_unused __attribute__((unused))
 
 #define BOOTENV_MAXLINE 512 /* max line size of a bootenv.txt file */
 
@@ -399,7 +399,7 @@ err:
 }
 
 static int
-fill_output_buffer(bootenv_t env, char *buf, size_t buf_size_max __unused,
+fill_output_buffer(bootenv_t env, char *buf, size_t buf_size_max ubi_unused,
                size_t *written)
 {
        int rc = 0;
@@ -586,7 +586,7 @@ err:
 }
 
 int
-bootenv_valid(bootenv_t env __unused)
+bootenv_valid(bootenv_t env ubi_unused)
 {
        /* @FIXME No sanity check implemented. */
        return 0;
@@ -646,8 +646,8 @@ err:
 
 int
 bootenv_pdd_keep(bootenv_t env_old, bootenv_t env_new, bootenv_t *env_res,
-                int *warnings, char *err_buf __unused,
-                size_t err_buf_size __unused)
+                int *warnings, char *err_buf ubi_unused,
+                size_t err_buf_size ubi_unused)
 {
        bootenv_list_t l_old = NULL;
        bootenv_list_t l_new = NULL;
@@ -756,8 +756,8 @@ err:
 
 int
 bootenv_pdd_overwrite(bootenv_t env_old, bootenv_t env_new,
-                     bootenv_t *env_res, int *warnings __unused,
-                     char *err_buf __unused, size_t err_buf_size __unused)
+                     bootenv_t *env_res, int *warnings ubi_unused,
+                     char *err_buf ubi_unused, size_t err_buf_size ubi_unused)
 {
        if ((env_old == NULL) || (env_new == NULL) || (env_res == NULL))
                return -EINVAL;
@@ -767,7 +767,7 @@ bootenv_pdd_overwrite(bootenv_t env_old, bootenv_t env_new,
 
 int
 bootenv_pdd_merge(bootenv_t env_old, bootenv_t env_new, bootenv_t *env_res,
-                 int *warnings __unused, char *err_buf, size_t err_buf_size)
+                 int *warnings ubi_unused, char *err_buf, size_t err_buf_size)
 {
        if ((env_old == NULL) || (env_new == NULL) || (env_res == NULL))
                return -EINVAL;
index 8c4dd54f7008f79af98b12672e04f3832fadc0c5..55e60f31e8e716e7b9313394bd53683faff30693 100644 (file)
@@ -23,6 +23,6 @@
 #define PACKAGE_BUGREPORT                                              \
        "haver@vnet.ibm.com, dedekind@linutronix.de, or tglx@linutronix.de"
 
-#define __unused __attribute__((unused))
+#define ubi_unused __attribute__((unused))
 
 #endif
index e60290a7f4e93a1a9b84ac804b4ddc763b03bff4..9f172081ce04b754dc3ebd24bafcc8ddd85c207d 100644 (file)
 #include <mtd/ubi-header.h>    /* FIXME Is this ok here? */
 #include "crc32.h"
 
-#define __unused __attribute__((unused))
+#define ubi_unused __attribute__((unused))
 
 #define COMPARE_BUFFER_SIZE 2048
 
-static const char copyright [] __unused =
+static const char copyright [] ubi_unused =
        "Copyright International Business Machines Corp., 2006, 2007";
 
 /* simply clear buffer, then write into front of it */
index 258e555f439b46a9598756a66d816fd94d2ad74a..238c6fa047add98cae1d95f437bb6ecd4afa7180 100644 (file)
@@ -247,7 +247,7 @@ ubigen_write_broken_update(ubi_info_t u, uint32_t blk)
 }
 
 void
-dump_info(ubi_info_t u __unused)
+dump_info(ubi_info_t u ubi_unused)
 {
 #ifdef DEBUG
        int err = 0;
index c4860f624ce4aab1d39c3dec7e4792cf684a869e..5b4207502632a96ef46f568d4adc2d8f9b22dd21 100644 (file)
@@ -129,7 +129,7 @@ sysfs_read_dev_subst(const char *patt, unsigned int *major,
 }
 
 static int
-sysfs_read_ull(const char *file __unused, unsigned long long *num __unused)
+sysfs_read_ull(const char *file ubi_unused, unsigned long long *num ubi_unused)
 {
        return 0;
 }
@@ -148,7 +148,7 @@ sysfs_read_ull_subst(const char *patt, unsigned long long *num, int n, ...)
 }
 
 static int
-sysfs_read_uint(const char *file __unused, unsigned int *num __unused)
+sysfs_read_uint(const char *file ubi_unused, unsigned int *num ubi_unused)
 {
        return 0;
 }