summaryrefslogtreecommitdiffstats
path: root/tools/fs_config
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
commit05806d7af62e07c6225b2e7103a1b115ecf6c9ad (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /tools/fs_config
parent094268cf8cb37b9d904c8a1e3559cdd46d73cf66 (diff)
downloadbuild-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.zip
build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.gz
build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tools/fs_config')
-rw-r--r--tools/fs_config/Android.mk27
-rw-r--r--tools/fs_config/fs_config.c69
2 files changed, 0 insertions, 96 deletions
diff --git a/tools/fs_config/Android.mk b/tools/fs_config/Android.mk
deleted file mode 100644
index 3f2ed95..0000000
--- a/tools/fs_config/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright (C) 2008 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-ifneq ($(TARGET_SIMULATOR),true)
-
-LOCAL_SRC_FILES := fs_config.c
-LOCAL_MODULE := fs_config
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-LOCAL_MODULE_TAGS := eng
-
-include $(BUILD_HOST_EXECUTABLE)
-
-endif # !TARGET_SIMULATOR
diff --git a/tools/fs_config/fs_config.c b/tools/fs_config/fs_config.c
deleted file mode 100644
index 5b99b30..0000000
--- a/tools/fs_config/fs_config.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <string.h>
-
-#include "private/android_filesystem_config.h"
-
-// This program takes a list of files and directories (indicated by a
-// trailing slash) on the stdin, and prints to stdout each input
-// filename along with its desired uid, gid, and mode (in octal).
-// The leading slash should be stripped from the input.
-//
-// Example input:
-//
-// system/etc/dbus.conf
-// data/app/
-//
-// Output:
-//
-// system/etc/dbus.conf 1002 1002 440
-// data/app 1000 1000 771
-//
-// Note that the output will omit the trailing slash from
-// directories.
-
-int main(int argc, char** argv) {
- char buffer[1024];
-
- while (fgets(buffer, 1023, stdin) != NULL) {
- int is_dir = 0;
- int i;
- for (i = 0; i < 1024 && buffer[i]; ++i) {
- switch (buffer[i]) {
- case '\n':
- buffer[i-is_dir] = '\0';
- i = 1025;
- break;
- case '/':
- is_dir = 1;
- break;
- default:
- is_dir = 0;
- break;
- }
- }
-
- unsigned uid = 0, gid = 0, mode = 0;
- fs_config(buffer, is_dir, &uid, &gid, &mode);
- printf("%s %d %d %o\n", buffer, uid, gid, mode);
- }
- return 0;
-}