search for: rosh_cmd_sz

Displaying 5 results from an estimated 5 matches for "rosh_cmd_sz".

2009 Feb 15
2
COM32 module: Read-Only shell
...s; /* index, argument length, current position + in cmdstr */ + curpos = 0; + cmdstr[0] = '\0'; /* Nullify string just to be sure */ + for (i = barg; i < argc; i++) { + arglen = strlen(argv[i]); + /* Theoretically, this should never be met in SYSLINUX */ + if ((curpos + arglen) > (ROSH_CMD_SZ - 1)) + arglen = (ROSH_CMD_SZ - 1) - curpos; + memcpy(cmdstr + curpos, argv[i], arglen); + curpos += arglen; + if (curpos >= (ROSH_CMD_SZ - 1)) { + /* Hopefully, curpos should not be greater than + (ROSH_CMD_SZ - 1) */ + /* Still need a '\0' at the last character */ + cmdst...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...ty = 'F'; - break; - default: - ty = '*'; - } -#endif /* DO_DEBUG */ -// printf("%s\n", de->d_name); - printf("'%s'\n", de->d_name); -#ifdef DO_DEBUG -// inchar = fgetc(stdin); -// fgets(instr, ROSH_CMD_SZ, stdin); -#endif /* DO_DEBUG */ - de = readdir(d); -// if(filepos>15){ de = NULL; printf("Force Break\n");} - } - closedir(d); + de.d_ino = rosh_ls_d_ino(&fdstat); + de.d_type = (IFTODT(fdstat.st_mode)); + strcpy(de.d_name, filestr); + if (S_ISREG(f...
2009 Mar 06
4
rosh patch
...de = readdir(d); - while (de != NULL) { + while ( de = readdir(d) ) { filepos++; #ifdef DO_DEBUG // if (strlen(de->d_name) > 25) de->d_name[25] = 0; @@ -438,7 +435,6 @@ // fgets(instr, ROSH_CMD_SZ, stdin); #endif /* DO_DEBUG */ free(de); - de = readdir(d); // if(filepos>15){ de = NULL; printf("Force Break\n");} } printf("Dir.dd_fd: '%8d'\n",...
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...39;*'; - } - printf("@%8d:%8d:%4d ", (int)de->d_ino, (int)de->d_size, de->d_mode); -#endif /* DO_DEBUG */ -// printf("%s\n", de->d_name); -printf("'%s'\n", de->d_name); -#ifdef DO_DEBUG -// inchar = fgetc(stdin); -// fgets(instr, ROSH_CMD_SZ, stdin); -#endif /* DO_DEBUG */ - free(de); - de = readdir(d); -// if(filepos>15){ de = NULL; printf("Force Break\n");} - } -printf("Dir.dd_fd: '%8d'\n", d->dd_fd); - closedir(d); + de.d_ino = rosh_ls_d_ino(&fdstat); + de.d_type = fdstat.st_mo...
2009 Mar 07
3
rosh patch V2
Here is a second version of my patch from last night. It uses the provided ctype function isspace and does the same readdir(). I remove the rosh_issp() function. I admit to being a bit liberal with my use of braces and spaces. We all of the habit of knowing we can invent a more perfect wheel. Let me know if you have any questions. Keith -------------- next part -------------- A non-text