2007年6月19日

修改了 curlftpfs 在挂载 AIX 和 HP-UX 时的问题

ftpfs目前仍然不稳定,我在连接hp-ux时遇到中文日期不兼容等问题,
可以参见我在 ubuntu bug 提交的出错报告 [ 我的QQ是274980,不过很少在线 ]

现在发现的不兼容情况如下:

1、在AIX上,早于6个月的数据会显示年份而不显示分秒。这种情况本来
是在程序的考虑范围之内的,但是不知道为什么程序少去掉了一个空格,
导致部分文件名比实际文件名前多了一个空格,自然访问报错。

I'v reported that curlftpfs 0.9 + libcurl 7.15.5 works unnormal with aix ftpserver,
( https://bugs.launchpad.net/ubuntu/+source/curlftpfs/+bug/120018 )
so,i updated curlftpfs to 0.9.1 and update libcurl to 7.16.2,things goes even badder.

with curlftpfs 0.9.1 + 7.16.2 ( mount remote aix ftp direcotry to local linux system ):
files and directories older than six month are displayed error with a space before it.

I had to modify ftpfs-ls.c ,
line 61:
/* "%5s" "%*c" year */
"%5s" SPACES /* year */
line 73:
/* "%5s" "%*c" year */
"%5s" SPACES /* year */

thing goes well, i can list direcotries and vi files now .
NOTICE!! havn't test under other ftpservers !!

files lists by aix ftpserver is:
-rw-r--r-- 1 smisdep tsgrp 502 Nov 16 2006 card_type
-rw-r--r-- 1 smisdep tsgrp 3853069 Nov 22 2006 info.txt
-rw-r--r-- 1 smisdep tsgrp 7827 Nov 22 2006 inst.txt
-rw-r--r-- 1 smisdep tsgrp 12590 Dec 01 2006 m_bmw_data_fhyzhdzd.txt
-rw-r--r-- 1 smisdep tsgrp 15054 Dec 01 2006 m_bmw_data_dwyqtdwwl.txt
-rw-r--r-- 1 smisdep tsgrp 201344 Dec 11 2006 888
-rw-r--r-- 1 smisdep tsgrp 81308 Dec 21 10:23 111.txt
-rw-r--r-- 1 smisdep tsgrp 4533 Dec 21 10:26 create_cardapp_tabel.sql
-rw-rw-rw- 1 smisdep tsgrp 1528 Dec 25 15:31 makeGroup.log
-rw-r----- 1 smisdep tsgrp 12753 Dec 25 16:37 makegroup.sql
-rw-r--r-- 1 smisdep tsgrp 128 Dec 28 10:44 wlq.sql

files modifed at 2006 have double space before it's name ,and those modifed at 2007
have only one space before it's name.


2、第二种情况还没有汇报(因为这是中文Locale的问题,不知道是否有通用性)
在HP-UX 下面设置FTP服务器显示中文日期后,格式如下:

有多种情况,而且空格的出现也不是非常有规律,为了方便说明,我把 年月日用??
代替,大家应该看得明白

drwx------ 2 pcrm pcrm 8192 6??18?? 09:17 bin
drwxrwxrwx 1 pcrm pcrm 18 2006??6?? 8?? data
drwx------ 2 pcrm pcrm 8192 6?? 7?? 16:12 etc
drwx------ 3 pcrm pcrm 8192 6??18?? 09:17 include
drwx------ 6 pcrm pcrm 8192 3??19?? 10:38 init
drwx------ 3 pcrm pcrm 32768 6??18?? 23:04 log
drwx------ 11 pcrm pcrm 8192 6?? 8?? 16:21 public
-rw-r--r-- 1 pcrm pcrm 22266 5??23?? 11:02 t_mng_reportinfo.txt
-rw-r--r-- 1 pcrm pcrm 15977 6?? 7?? 15:48 t_prod_info.txt
-rw-rw-rw- 1 pcrm pcrm 19070 6??15?? 17:54 time20070531.txt
drwx------ 4 pcrm pcrm 8192 6??18?? 08:48 tmp

------------------------------------------------------------------------------

花了两天时间把 curlftpfs的 ftpfs-ls.c 文件进行了修改(版本是curlftpfs-0.9.1)
增加函数 parse_dir_hpux_zhcn

test code here, ( base on curlftpfs0.9.1 -- ftpfs-ls.c )


支持 AIX 下
-rw-r--r-- 1 smisdep tsgrp 502 Nov 16 2006 card_type

支持 HP-UX 下
drwxrwxrwx 1 pcrm pcrm 18 2006年6月 8日 data

------------------------------------------------------------------------------

没有评论: