FFFTPのソースコードです。
Revisión | fade6db78df2af1e75f0cdb7b68240eea92c1c54 (tree) |
---|---|
Tiempo | 2012-10-25 23:58:43 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Add support for uClinux ftpd (untested).
@@ -313,6 +313,8 @@ | ||
313 | 313 | #if defined(HAVE_TANDEM) |
314 | 314 | #define LIST_TANDEM 50 /* HP NonStop Server */ |
315 | 315 | #endif |
316 | +// uClinux | |
317 | +#define LIST_UNIX_17 51 /* UNIX 17 */ | |
316 | 318 | |
317 | 319 | #define LIST_MELCOM 0x100 /* MELCOM80 */ |
318 | 320 |
@@ -694,6 +696,17 @@ LIST_UNIX_70 | ||
694 | 696 | drwxr-x--- 3 root root 4096 2011-12-06 23:39 .. |
695 | 697 | -rw-r----- 1 root root 251 2011-12-06 23:39 .hoge |
696 | 698 | |
699 | +// uClinux | |
700 | +*LIST_UNIX_17 | |
701 | + 0 1 2 3 4 5 | |
702 | + ------------------------------------------------------- | |
703 | + -rw-r--r-- 1 0 0 100 services | |
704 | + lrwxrwxrwx 1 0 0 20 resolv.conf -> /var/run/resolv.conf | |
705 | + drwxr-sr-x 1 0 0 0 rc.d | |
706 | + -rw-r--r-- 1 0 0 290 rc | |
707 | + -rw-r--r-- 1 0 0 34 passwd | |
708 | + lrwxrwxrwx 1 0 0 18 inittab -> ../var/tmp/inittab | |
709 | + | |
697 | 710 | *LIST_TANDEM |
698 | 711 | 0 1 2 3 4 5 6 |
699 | 712 | --------------------------------------------------------------- |
@@ -3653,6 +3653,13 @@ static int AnalizeFileInfo(char *Str) | ||
3653 | 3653 | |
3654 | 3654 | if((Ret != LIST_UNKNOWN) && (Flag1 == YES)) |
3655 | 3655 | Ret |= LIST_MELCOM; |
3656 | + | |
3657 | + // uClinux | |
3658 | + if((Ret == LIST_UNKNOWN) && | |
3659 | + (FindField(Str, Tmp, 5+Add1, NO) == FFFTP_SUCCESS)) | |
3660 | + { | |
3661 | + Ret = LIST_UNIX_17; | |
3662 | + } | |
3656 | 3663 | } |
3657 | 3664 | } |
3658 | 3665 |
@@ -5143,6 +5150,8 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
5143 | 5150 | // case LIST_MELCOM : |
5144 | 5151 | // linux-ftpd |
5145 | 5152 | case LIST_UNIX_16 : |
5153 | + // uClinux | |
5154 | + case LIST_UNIX_17 : | |
5146 | 5155 | default: |
5147 | 5156 | /* offsはサイズの位置, offs=0はカラム4 */ |
5148 | 5157 | offs = 0; |
@@ -5198,6 +5207,9 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
5198 | 5207 | (ListType == LIST_UNIX_73) || |
5199 | 5208 | (ListType == LIST_UNIX_16)) |
5200 | 5209 | offs2 = -1; |
5210 | + // uClinux | |
5211 | + if(ListType == LIST_UNIX_17) | |
5212 | + offs2 = -3; | |
5201 | 5213 | |
5202 | 5214 | /* offs3はオーナ名の位置 */ |
5203 | 5215 | offs3 = 0; |
@@ -5228,6 +5240,9 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
5228 | 5240 | (ListType == LIST_UNIX_74) || |
5229 | 5241 | (ListType == LIST_UNIX_75)) |
5230 | 5242 | Flag2 = 1; |
5243 | + // uClinux | |
5244 | + if(ListType == LIST_UNIX_17) | |
5245 | + Flag2 = -1; | |
5231 | 5246 | |
5232 | 5247 | *InfoExist |= (FINFO_DATE | FINFO_SIZE | FINFO_ATTR); |
5233 | 5248 |
@@ -5325,6 +5340,11 @@ static int ResolvFileInfo(char *Str, int ListType, char *Fname, LONGLONG *Size, | ||
5325 | 5340 | } |
5326 | 5341 | } |
5327 | 5342 | } |
5343 | + // uClinux | |
5344 | + else if(Flag2 == -1) | |
5345 | + { | |
5346 | + *InfoExist &= ~(FINFO_DATE | FINFO_TIME); | |
5347 | + } | |
5328 | 5348 | else |
5329 | 5349 | { |
5330 | 5350 | /* LIST_UNIX_?4, LIST_UNIX_?5 の時 */ |