fix: clean import
This commit is contained in:
parent
b9a8a75bd6
commit
aca0ebba71
@ -1,12 +1,5 @@
|
||||
/** @file */
|
||||
#include "disk.h"
|
||||
#include "env.h"
|
||||
#include "struct.h"
|
||||
#include "utils.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int init_inode_in_disk(disk *d, int inode_index, int filetype,
|
||||
unsigned short perms, int owned_bloc) {
|
||||
|
||||
@ -2,10 +2,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include "const.h"
|
||||
#include "struct.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "env.h"
|
||||
#include "const.h"
|
||||
#include "utils.h"
|
||||
|
||||
|
||||
disk create_disk();
|
||||
disk open_disk(char* filename);
|
||||
|
||||
@ -7,7 +7,7 @@ env *init_envs() {
|
||||
return NULL;
|
||||
|
||||
envs[0].key = "PWD";
|
||||
envs[0].value = "/dir";
|
||||
envs[0].value = "/";
|
||||
|
||||
envs[1].key = "USER";
|
||||
envs[1].value = "guams";
|
||||
|
||||
11
src/exec.c
11
src/exec.c
@ -1,13 +1,6 @@
|
||||
/** @file */
|
||||
#include "exec.h"
|
||||
#include "disk.h"
|
||||
#include "env.h"
|
||||
#include "utils.h"
|
||||
#include "utils.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
int do_cd(disk *d, char *path) {
|
||||
char full_path[1024] = {0};
|
||||
@ -51,7 +44,7 @@ int execute_cmd(disk *d, char **args) {
|
||||
return do_cd(d, args[1]);
|
||||
}
|
||||
|
||||
int pid = 0;
|
||||
int pid = fork();
|
||||
|
||||
if (pid == 1) {
|
||||
return -1;
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
/** @file */
|
||||
#pragma once
|
||||
#include "disk.h"
|
||||
#include "env.h"
|
||||
#include "utils.h"
|
||||
#include "utils.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "disk.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
@ -1,12 +1,5 @@
|
||||
/** @file */
|
||||
#include "parsing.h"
|
||||
#include "const.h"
|
||||
#include "env.h"
|
||||
#include "exec.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/**
|
||||
* @brief Attend que l'utilisateur appuie sur entrée pour récupérer la ligne écrite
|
||||
|
||||
@ -1,9 +1,13 @@
|
||||
/** @file */
|
||||
#pragma once
|
||||
#include "env.h"
|
||||
#include "const.h"
|
||||
#include "env.h"
|
||||
#include "exec.h"
|
||||
#include "struct.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "struct.h"
|
||||
#include <string.h>
|
||||
|
||||
void open_seyshell(disk* disk);
|
||||
@ -1,9 +1,4 @@
|
||||
#include "utils.h"
|
||||
#include "env.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void format_path(char *dest, char *src, int dest_len) {
|
||||
if (src == NULL || strcmp(src, "/") == 0 || strlen(src) == 0) {
|
||||
|
||||
@ -1,4 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "env.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void canonicalize_path(char *path);
|
||||
void format_path(char *dest, char *src, int dest_len);
|
||||
Loading…
Reference in New Issue
Block a user