summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-01-12 15:17:04 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2013-01-12 15:17:04 +0700
commit5d548e71c0ee61c52bf44642829bdd002f84346f (patch)
tree959128e5f71186a665bbeea7f92313f5bfda54ba
parente8139108c77cb93a1b4731b354df7af85cf1a02b (diff)
downloaddevice_samsung_aries-common-5d548e71c0ee61c52bf44642829bdd002f84346f.zip
device_samsung_aries-common-5d548e71c0ee61c52bf44642829bdd002f84346f.tar.gz
device_samsung_aries-common-5d548e71c0ee61c52bf44642829bdd002f84346f.tar.bz2
aries-common: remove unused bmlutils
Change-Id: Ia520161ac647357762b59fe5f4bdf4d60a77342e
-rw-r--r--bmlutils/Android.mk14
-rw-r--r--bmlutils/bmlwrite.c35
2 files changed, 0 insertions, 49 deletions
diff --git a/bmlutils/Android.mk b/bmlutils/Android.mk
deleted file mode 100644
index a92b070..0000000
--- a/bmlutils/Android.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-ifneq ($(BOARD_USES_BML_OVER_MTD),true)
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := bmlwrite
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
-LOCAL_SRC_FILES := bmlwrite.c
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_STATIC_LIBRARIES += libstdc++ libc
-include $(BUILD_EXECUTABLE)
-
-endif
diff --git a/bmlutils/bmlwrite.c b/bmlutils/bmlwrite.c
deleted file mode 100644
index 74860c6..0000000
--- a/bmlutils/bmlwrite.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <string.h>
-
-#define BML_UNLOCK_ALL 0x8A29 ///< unlock all partition RO -> RW
-
-int main(int argc, char** argv) {
- char buf[4096];
- int dstfd, srcfd, bytes_read, bytes_written, total_read = 0;
- if (argc != 3)
- return 1;
- if (argv[1][0] == '-' && argv[1][1] == 0)
- srcfd = 0;
- else {
- srcfd = open(argv[1], O_RDONLY | O_LARGEFILE);
- if (srcfd < 0)
- return 2;
- }
- dstfd = open(argv[2], O_RDWR | O_LARGEFILE);
- if (dstfd < 0)
- return 3;
- if (ioctl(dstfd, BML_UNLOCK_ALL, 0))
- return 4;
- do {
- total_read += bytes_read = read(srcfd, buf, 4096);
- if (!bytes_read)
- break;
- if (bytes_read < 4096)
- memset(&buf[bytes_read], 0, 4096 - bytes_read);
- if (write(dstfd, buf, 4096) < 4096)
- return 5;
- } while(bytes_read == 4096);
- return 0;
-}