Displaying 5 results from an estimated 5 matches for "ifilstr".
Did you mean:
filestr
2009 Mar 05
0
[PATCH 5/5] COM32/rosh: Improvements
...ilepos;
+
+ filepos = 0;
+ de = readdir(d);
+ while (de != NULL) {
+ filepos++;
+ rosh_ls_arg_dir_de(filestr, de, optarr);
+ ROSH_FREE_DIRENT(de);
+ de = readdir(d);
+ }
+} /* rosh_ls_arg_dir */
+
/* Simple directory listing for one argument (file/directory) based on
* filestr and pwdstr
* ifilstr input filename/directory name to list
* pwdstr Present Working Directory string
+ * optarr Option Array
*/
-void rosh_dir_arg(const char *ifilstr, const char *pwdstr)
+void rosh_ls_arg(const char *ifilstr, const char *pwdstr, const int *optarr)
{
struct stat fdstat;
int status;
@@ -356,15...
2010 Jun 27
1
[PATCH] ROSH: Upgraded
...PWD
+/*
+ * Qualifies a filename relative to the working directory
+ * filestr Filename to qualify
+ * pwdstr working directory
+ * returns qualified file name string
*/
-void rosh_1(const char *cmdstr, const char *pwdstr, const char *ipwdstr)
+void rosh_qualify_filestr(char *filestr, const char *ifilstr,
+ const char *pwdstr)
{
- ROSH_DEBUG("CMD: '%s'\npwd: '%s'\npwd: '%s'\n", cmdstr, pwdstr, ipwdstr);
-} /* rosh_1 */
+ int filepos = 0;
+ if ((filestr) && (pwdstr) && (ifilstr)) {
+ if (ifilstr[0] != SEP) {
+ strcpy(filestr, pwd...
2009 Feb 15
2
COM32 module: Read-Only shell
...str, const char *pwdstr)
+{
+ ROSH_DEBUG("CMD: '%s'\npwd: '%s'\n", cmdstr, pwdstr);
+ printf("CFG: '%s'\n", syslinux_config_file());
+} /* rosh_cfg */
+
+/* Simple directory listing for one argument (file/directory) based on
+ * filestr and pwdstr
+ * ifilstr input filename/directory name to list
+ * pwdstr Present Working Directory string
+ */
+void rosh_dir_arg(const char *ifilstr, const char *pwdstr)
+{
+ struct stat fdstat;
+ int status;
+ int fd;
+ char filestr[ROSH_PATH_SZ + 1];
+ int filepos;
+ DIR *d;
+ struct dirent *de;
+#ifdef DO_DEBUG
+ char...
2009 Mar 06
4
rosh patch
...+ if ( ( inc == ' ') || ( inc == '\t') )
+ {
+ rv = 1 ;
}
return rv;
} /* ros_issp */
@@ -384,8 +384,7 @@
if (S_ISDIR(fdstat.st_mode)) {
ROSH_DEBUG("PATH '%s' is a directory\n", ifilstr);
d = fdopendir(fd);
- de = readdir(d);
- while (de != NULL) {
+ while ( de = readdir(d) ) {
#ifdef DO_DEBUG
filestr2[0] = 0;
file2pos = strlen(...
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