Function report |
Source Code:init\do_mounts_rd.c |
Create Date:2022-07-28 13:58:01 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rd_load_image
Proto:int __init rd_load_image(char *from)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
char * | from |
178 | res = 0 |
182 | char * buf = NULL |
183 | rotate = 0 |
184 | decompress_fn decompressor = NULL |
186 | char rotator[4] = {'|', '/', '-', '\\'} |
194 | If in_fd < 0 Then Go to noclose_input |
201 | If nblocks == 0 Then |
202 | If crd_load(in_fd, out_fd, decompressor) == 0 Then Go to successful_load |
204 | Go to done |
211 | If ksys_ioctl(out_fd, urn device size /512 (long *arg) , (unsignedlong) & rd_blocks) < 0 Then rd_blocks = 0 |
213 | Else rd_blocks >>= 1 |
219 | Go to done |
225 | If ksys_ioctl(in_fd, urn device size /512 (long *arg) , (unsignedlong) & devblocks) < 0 Then devblocks = 0 |
227 | Else devblocks >>= 1 |
233 | If devblocks == 0 Then |
235 | Go to done |
238 | buf = Allocation memory |
239 | If Not buf Then |
241 | Go to done |
248 | Like KERN_CONT, pr_cont() should only be used when continuing* a line with no newline ('\n') enclosed. Otherwise it defaults* back to KERN_DEFAULT.("done disk #%d.\n", disk++) |
249 | rotate = 0 |
252 | Go to noclose_input |
254 | change_floppy("disk #%d", disk) |
256 | If in_fd < 0 Then |
258 | Go to noclose_input |
262 | ksys_read(in_fd, buf, BLOCK_SIZE) |
263 | ksys_write(out_fd, buf, BLOCK_SIZE) |
265 | If Not (i % 16) Then |
273 | successful_load : |
274 | res = 1 |
275 | done : |
277 | noclose_input : |
279 | out : |
281 | ksys_unlink("/dev/ram") |
282 | Return res |
Name | Describe |
---|---|
rd_load_disk | |
initrd_load |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |