lkml.org 
[lkml]   [1996]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: no modification time with smbfs-0.5 and Linux 2.0.21 kernel
Date
From
> 
> I believe the subject says it all. With Linux 2.0.21, files created
> on a remote file system mounted via sbmount from the smbfs-0.5 package
> installed on a system running with a 2.0.21 kernel have a modification
> time of 0 which is 1/1/70 on Unix, and various other timestamps on
> various other operating systems. A quick read of the 2.0.22 patch
> indicates that there were no relevant fixes in that release. This
> behavior does NOT occur in 2.0.15. I have not run any kernel versions
> between 2.0.15 and 2.0.21, nor have I tried the 2.1 series. Is there
> a simple or known fix for this problem?
>
> I am also having a situation where, when mounting a particular file
> system from a Windows 95 machine, ls shows different results on
> consecutive runs even when the underlying file system is not changed.
> I can investigate this a bit and send in a more detailed report unless
> someone jumps out and says, "Oh, yes -- this is because of ...."
>
> Thanks for any assistance you may be able to provide.
>
> -

There are a lot of problems (it seems ) with the time stamps on smbfs in
linux (I looked at this, I can't get consistent behavior against win95...
I'm fixed the date stuff and I'm seeing the very "strange results"...

What works well if I make/touch the file on DOS, the times on linux makes
sense.

[even after I fixed the obvious problem of indexes an array with -1
(in smbfs/proc.c, what if date is 0?

tatic int
date_dos2unix(unsigned short time,unsigned short date)
{
int month,year,secs;

month = ((date >> 5) & 15)-1;
/* what if month < 0? */
year = date >> 9;
secs = (time & 31)*2+60*((time >> 5) & 63)+(time >> 11)*3600+86400*
((date & 31)-1+day_n[month]+(year/4)+year*365-((year & 3) == 0 &&
month < 2 ? 1 : 0)+3653);
/* days since 1.1.70 plus 80's leap day */
return local2utc(secs);
}


Also, can we write algorithms which are more readable by people?
(this is major cryptic...)

Also, why are there more entries in the month to day array?
* Linear day numbers of the respective 1sts in non-leap years. */

static int day_n[] = { 0,31,59,90,120,151,181,212,243,273,304,334,0,0,0,0 };
/* JanFebMarApr May Jun Jul Aug Sep Oct Nov Dec */





--
marty
leisner@sdsp.mc.xerox.com
Member of the League for Programming Freedom



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.115 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site