summaryrefslogtreecommitdiffstats
path: root/testModule/wrap.c
diff options
context:
space:
mode:
authortorben2015-04-13 17:16:26 +0200
committertorben2015-04-13 17:16:26 +0200
commita232649db621930758e80e9be6e5834e8d91517e (patch)
treed6191dc704f57d972c06013962296084939cfe9e /testModule/wrap.c
parentbasic wrapper (diff)
downloadsystemd-init-a232649db621930758e80e9be6e5834e8d91517e.tar.gz
systemd-init-a232649db621930758e80e9be6e5834e8d91517e.tar.xz
systemd-init-a232649db621930758e80e9be6e5834e8d91517e.zip
Adding remotly notifyable test initramfs service.
Diffstat (limited to 'testModule/wrap.c')
-rw-r--r--testModule/wrap.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/testModule/wrap.c b/testModule/wrap.c
index 0f118235..51ca2d8c 100644
--- a/testModule/wrap.c
+++ b/testModule/wrap.c
@@ -4,38 +4,38 @@
#include <stdio.h>
void arg_print(int argc, char *argv[]) {
- int i = 0;
- int j = 0;
- for (i = 0; i < argc; i ++) {
- j = 0;
- while(argv[i][j] != '\0')
- printf("%c", argv[i][j++]);
-
- printf(" ");
- }
- printf("\n");
+ int i = 0;
+ int j = 0;
+ for (i = 0; i < argc; i ++) {
+ j = 0;
+ while(argv[i][j] != '\0')
+ printf("%c", argv[i][j++]);
+
+ printf(" ");
+ }
+ printf("\n");
}
int main(int argc, char *argv[]) {
- arg_print(argc, argv);
+ arg_print(argc, argv);
int count;
- char **copy = malloc(sizeof(char *) * (argc-1));
- for ( count = 0; count < argc - 1; count++ ) {
- copy[count] = strdup(argv[count + 1]);
- }
+ char **copy = malloc(sizeof(char *) * (argc-1));
+ for ( count = 0; count < argc - 1; count++ ) {
+ copy[count] = strdup(argv[count + 1]);
+ }
- arg_print(argc - 1, copy);
+ arg_print(argc - 1, copy);
- copy[0][0] = '@';
- argv[0][0] = '@';
+ copy[0][0] = '@';
+ argv[0][0] = '@';
- arg_print(argc - 1, copy);
+ arg_print(argc - 1, copy);
- if (-1 == execvp(argv[1], copy)) {
- perror("child process execve failed [%m]");
- return -1;
- }
+ if (-1 == execvp(argv[1], copy)) {
+ perror("child process execve failed [%m]");
+ return -1;
+ }
}