On Sunday, February 3, 2019 3:32:30 PM CET, Mayuresh Kathe wrote:
is there a port of "libgit2" available?
Libgit2 *is not* portable. They use mmap everywhere for I/O, which breaks
for 9P or NFS.
https://github.com/libgit2/libgit2/blob/635693d3bc55770ec7a6640ba3f2f0ee434a6042/src/indexer.c#L597
Hi all (who remain true to the cause :-),
I cam across a bug in cifs.
An empty directory under windows 7 pro contains a single entry "." but it
doesn't appear to contain "..".
As a result "." is not removed on dirscan and plan9 gets when trying to
traverse the hierarchy.
diff /n/dump/2019/
sorry, I generated the diff on the wrong server, slightly safer fix below
diff /n/dump/2019/0205/sys/src/cmd/cifs/main.c /sys/src/cmd/cifs/main.c
261,265c261,264
< if(got >= 2 && strcmp(fi[0].name, ".") == 0 &&
< strcmp(fi[1].name, "..") == 0){
<
thanks!
> while(got > 0 && strcmp(fi[0].name, ".") == 0 ||
> strcmp(fi[0].name, "..") == 0){
that looks like a bug to me. you ment to write the following instead?
while(got > 0 && (strcmp(fi[0].name, ".") == 0 || strcmp(fi[0].name, "..") ==
0)){
--
cinap
> that looks like a bug to me.
Yep,
In fact it turned out to be rather more subtle than I first though, my bad.
sorry for the noise.
-Steve
diff /n/dump/2019/0205/sys/src/cmd/cifs/main.c /sys/src/cmd/cifs/main.c
216a217,222
> /* remove "." and ".." from the cache */
> static int
> rmdots(Aux
do you have a recent copy arround somewhere?
theres more stuff that needs merging like:
-from_cache:
fi = (FInfo *)(a->cache + (off - a->off));
npath = smprint("%s/%s", mapfile(a->path), fi->name);
- I2D(d, a->sp, npath, fi);
+ I2D(d, a->sp, npath, realmtime(npath), fi