Skip to content

Commit efcecd4

Browse files
committed
Rename user_program to shell.
1 parent 224db4d commit efcecd4

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ kernel.elf: $(OBJECTS) $(STDLIB)
5858
start_user_program.o: start_user_program.s
5959
$(NASM) $(ASFLAGS) $< -o $@
6060

61-
user_program.o: user_program.c
61+
shell.o: shell.c
6262
$(GCC) $(CFLAGS) $< -o $@
6363

64-
user_program.bin: user_program.o start_user_program.o $(STDLIB)
64+
shell.bin: shell.o start_user_program.o $(STDLIB)
6565
$(LD) -T link_user_program.ld -melf_i386 $^ -o $@
6666

67-
built_file_system: file_system_root/* user_program.bin
67+
built_file_system: file_system_root/* shell.bin
6868
script/build_file_system
6969

70-
os.iso: kernel.elf user_program.bin menu.lst built_file_system
70+
os.iso: kernel.elf shell.bin menu.lst built_file_system
7171
mkdir -p iso/boot/grub # create the folder structure
7272
mkdir -p iso/modules
7373
cp stage2_eltorito iso/boot/grub/ # copy the bootloader

kmain.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ void kmain(struct kernel_memory_descriptor_t kernel_memory, uint32_t ebx) {
137137
initialize_filesystem(first_module(mbinfo));
138138
fprintf(LOG, " - done\n");
139139

140-
struct file_t* file = get_file("user_program.bin");
140+
char* file_name = "shell.bin";
141+
struct file_t* file = get_file(file_name);
142+
if (file == 0) {
143+
fprintf(LOG, "ERROR: could not find file %s\n", file_name);
144+
while(1){}
145+
}
141146

142147
fprintf(LOG, "- Creating a user process...\n");
143148
create_process(file);

script/build_file_system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def include_file(path, output_file)
1010
end
1111

1212
f = File.open('built_file_system', 'w')
13-
include_file("#{File.dirname(__FILE__)}/../user_program.bin", f)
13+
include_file("#{File.dirname(__FILE__)}/../shell.bin", f)
1414

1515
dirname = "#{File.dirname(__FILE__)}/../file_system_root"
1616
Dir.foreach(dirname) do |item|

user_program.c renamed to shell.c

File renamed without changes.

0 commit comments

Comments
 (0)