9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] venti woes with brand new install
Date: Sat,  8 Sep 2007 12:49:30 -0400	[thread overview]
Message-ID: <3e90b031be3e4fc9eafb1eeadfb9f9e1@quanstro.net> (raw)
In-Reply-To: <289299487ad8b104193a761eba3fe691@gmx.de>

> found it!
>
> that is "defghijklmnopqrstuv..." instead of the expected "1234567890abc..."
>
> 13 bytes!
>
> b->data is incremented (and b->len decremented)13 bytes to skip the
> "venti config" magic in readifile() ifile.c:39.
> and freezblock() alculates the position of the zmagic by b->data + b->_size.
>
> maybe add a b->_data in ZBuffer or fix ifile.c?
>
> cinap

this might not fix everything as the tail magic was corrupted, too.

- erik


n/sources/plan9//sys/src/cmd/venti/srv/ifile.c:36,43 - ifile.c:36,44
  			freepart(p);
  			return -1;
  		}
- 		b->data += m;
- 		b->len -= m;
+ 		memmove(b->data, b->data+m, 8192-m);
+ 		memset(b->data+8192-m, 0, 8192-m);
+
  		z = memchr(b->data, 0, b->len);
  		if(z)
  			b->len = z - b->data;



  reply	other threads:[~2007-09-08 16:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-08 15:27 cinap_lenrek
2007-09-08 16:49 ` erik quanstrom [this message]
2007-09-08 17:07   ` cinap_lenrek
2007-09-08 19:08   ` cinap_lenrek
2007-09-08 21:45     ` John Soros
  -- strict thread matches above, loose matches on Subject: below --
2007-09-08 12:09 John Soros
2007-09-08 13:43 ` erik quanstrom
2007-09-08 14:27   ` gabidiaz
2007-09-09 12:01   ` John Soros
2007-09-09 12:05     ` erik quanstrom
2007-09-09 12:57       ` John Soros
2007-09-09 13:08         ` Uriel
2007-09-09 13:13         ` erik quanstrom
2007-09-09 13:22           ` Uriel
2007-09-10  8:12     ` SHRIZZA
2007-09-10  8:39       ` Uriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e90b031be3e4fc9eafb1eeadfb9f9e1@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).