-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
79 changes: 79 additions & 0 deletions
79
GRUB Study Data/2. Network/2. grub_mknetdir.c main함수 분석.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
[grub-mkimage.h2m](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/docs/man/grub-mkimage.h2m#L6) | ||
------------------------------ | ||
``` | ||
Grub의 부트할 수 있는 이미지를 만든다. | ||
.BR grub-install (8), | ||
.BR grub-mkrescue (1), | ||
.BR grub-mknetdir (8) | ||
``` | ||
|
||
[grub-mknetdir.c::main](https://github.com/kbu1564/SecurityBootloader/blob/develop/grub/util/grub-mknetdir.c#L174) | ||
------------------------------ | ||
1 . [grub_util_host_init](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/osdep/basic/init.c#L28) | ||
``` | ||
호스트명 설정 | ||
``` | ||
2 . [grub_util_disable_fd_syncs ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/osdep/unix/hostdisk.c#L213) | ||
``` | ||
allow_fd_syncs = 0; | ||
``` | ||
3 . [xstrdup ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/kern/emu/misc.c#L109) | ||
``` | ||
문자열 복사 함수 (return char *) | ||
``` | ||
|
||
4 . [grub_util_get_pkglibdir ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/osdep/aros/config.c#L53) | ||
``` | ||
GRUB_LIBDIR "/" PACKAGE 문자열로 반환 | ||
GRUB_LIBDIR() = $(eval echo "$libdir") | ||
PACKAGE = #define PACKAGE "grub" | ||
``` | ||
|
||
5 . [grub_util_path_concat ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/kern/emu/hostdisk.c#L659) | ||
``` | ||
가변 인자 복사 함수 | ||
``` | ||
|
||
6 . [argp_parse ]() | ||
``` | ||
The main interface to argp is the argp_parse function. In many cases, calling argp_parse is the only argument-parsing code needed in main | ||
``` | ||
|
||
7 . [grub_install_mkdir_p ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/util/grub-install-common.c#L164) | ||
``` | ||
dst(경로/디렉토리명)라는 char * 데이터타입의 변수를 매개변수로 받아 mkdir명령어를 수행하는 함수 | ||
``` | ||
|
||
8 . [grub_install_push_module ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/util/grub-install-common.c#L232) | ||
``` | ||
*val(모듈명)이라는 char * 데이터 타입의 변수를 매개변수로 받아 modules.entries에 추가하는 함수 | ||
``` | ||
**if (!grub_install_source_directory)** | ||
9 . [grub_install_get_platform_name ]() | ||
``` | ||
enum grub_install_plat platid 를 매개변수로 입력 받아 platforms[platid].cpu-platforms[platid].platform"의 문자열로 포맷 후 반환 | ||
``` | ||
|
||
10 . [grub_util_info ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/kern/emu/misc.c#L56) | ||
``` | ||
가변 인자(util info)를 매개변수로 입력 받아 strerr 스트림에 쓴다. | ||
``` | ||
|
||
11 . [grub_util_is_directory ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/grub-core/osdep/unix/hostdisk.c#L246) | ||
``` | ||
path라는 매개변수로 입력 받아 상태정보를 얻고 디렉토리인지 판별하는 함수 | ||
``` | ||
|
||
12 . [process_input_dir ](https://github.com/kbu1564/SecurityBootloader/search?utf8=%E2%9C%93&q=process_input_dir+#L113) | ||
``` | ||
소스 분석중 | ||
``` | ||
**else** | ||
13 . [grub_install_get_target ](https://github.com/kbu1564/SecurityBootloader/blob/1ca1a01546c9cf024781a1bc7ee3e6ba0f9eb4c9/grub/util/grub-install-common.c#L900) | ||
``` | ||
``` |