[package] hostap-driver: Fix package installation
[openwrt-10.03/.git] / package / mtd / src / fis.c
index e774e62a6a305e1c28e86b410c12f132224a2c4c..3108c5a9e6bf0df9c34593c78a7f56f2bb58d2ee 100644 (file)
@@ -1,3 +1,17 @@
+/*
+ * FIS table updating code for mtd
+ *
+ * Copyright (C) 2009 Felix Fietkau <nbd@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License v2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 #include <sys/mman.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -85,7 +99,7 @@ fis_validate(struct fis_part *old, int n_old, struct fis_part *new, int n_new)
 
        desc = fis_open();
        if (!desc)
-               return 0;
+               return -1;
 
        for (i = 0; i < n_new - 1; i++) {
                if (!new[i].size) {