public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "gmx" <for_spam@gmx.de>
To: <cygwin@cygwin.com>
Subject: mkcramfs under cygwin ??
Date: Sun, 26 May 2002 22:37:00 -0000	[thread overview]
Message-ID: <GCEKJAPMFCCHLBOOCMIBIEMBCLAA.for_spam@gmx.de> (raw)

CygWinners - hi again,

since i got no reply to my mkcramfs porting question (ok - mybe it's too special
and i'm too impatiently - sorry),
i spend some time on trying it myself.
I was really wondering how far I git -  better said, it's nearly done! :)

Beside of a little bug, it works basically - i can create compressed ram
filesystems under windows now.

I don`t really know, if i can expect being helped by this list - but i think
this question is cygwin specific.
If i'm wrong here and I inconvenience you - sorry - please tell me where/whom to
ask (maybe "alt.comp.programming.linux.rookies" or such ??)

The only thing i had to fix was to add "typedef long long int loff_t;" to
mkcramfs.c because it's not defined in cygwin's types.h.
Surprisingly, it compiled successfully - just with some warnings.

But there is a bug inside: The created filesystem contains "inconsistent"
symlink entries if i unpack them again with uncramfs on a
linux box - i.e. they are garbled.

linux:/tmp/testdir3/base # ls -la
insgesamt 7
drwxr-xr-x    9 vmware   bin           251 Apr 26 21:34 .
drwxr-xr-x   67 vmware   bin          1653 Apr 26 21:34 ..
drwxr-xr-x    2 vmware   bin           883 Apr 26 21:34 bin
drwxr-xr-x    2 vmware   bin            75 Apr 26 21:34 dev
drwxr-xr-x    3 vmware   bin           532 Apr 26 21:34 etc
drwxr-xr-x    5 vmware   bin           459 Apr 26 21:34 lib
lrwxrwxrwx    1 vmware   bin            13 Apr 26 21:34 linuxrc -> bin/busybox??
drwxr-xr-x    2 vmware   bin            35 Apr 26 21:34 proc
drwxr-xr-x    2 vmware   bin            35 Apr 26 21:34 root
lrwxrwxrwx    1 vmware   bin            86 Apr 26 21:34 sbin ->
binaÐ??a(u??@v??Xw???y??0z??H{??`|??x}???~??¨???À???Ø???ð???????
???8???drwxr-xr-x    2 vmware   bin            35 Apr 26 21:34 tmp
lrwxrwxrwx    1 vmware   bin            49 Apr 26 21:34 usr ->
tmpaè??aee//base/tmp/ion-0.8\pkg-tree\base\root\8
lrwxrwxrwx    1 vmware   bin             8 Apr 26 21:34 var -> tmp/vara


I think this maybe a result of the compile warning
$ make
gcc -Wall -O3    mkcramfs.c  -lz -o mkcramfs
mkcramfs.c: In function `parse_directory':
mkcramfs.c:177: warning: passing arg 4 of `scandir' from incompatible pointer
type
mkcramfs.c: In function `main':
mkcramfs.c:750: warning: int format, ssize_t arg (arg 2)
mkcramfs.c:757: warning: int format, ssize_t arg (arg 2)
mkcramfs.c:771: warning: int format, ssize_t arg (arg 4)
mkcramfs.c:781: warning: int format, ssize_t arg (arg 3)
mkcramfs.c:781: warning: int format, ssize_t arg (arg 4)

I think, the warnings for Lines 750 - 781 don't matter at all and can be
ignored, because it's just printf's/fprintf(stderr,....)'s

but what about this one :
mkcramfs.c:177: warning: passing arg 4 of `scandir' from incompatible pointer
type
?????

Line 177 is:
/* read in the directory and sort */
dircount = scandir(name, &dirlist, 0, cramsort);

I searched for scandir and found the declaration - but I have no clue, what this
means and how to interpret that.
Why does the error happen only with symlinks and not with normal files ?

sadly,I'm on war with pointers and all that stuff - last programming i did was
shell and some java....
(hey, i'm systems administrator - not programmer ;)))

Could someone please(please!) point me to some docs or give me some advice, how
to fix this problem ?
It will cost me weeks to find out, by myself, i think.....

cygwin:
int scandir (const char *__dir,
	     struct dirent ***__namelist,
	     int (*select) (const struct dirent *),
	     int (*compar) (const struct dirent **,const struct dirent **));


i compared that to my linux box:

linux:
extern int scandir (__const char *__restrict __dir,
		    struct dirent ***__restrict __namelist,
		    int (*__selector) (__const struct dirent *),
		    int (*__cmp) (__const void *, __const void *)) __THROW;

looks a little bit different.....

Thanks in advance 4 helping and best regards
Roland

References:
mkcramfs & sources: http://home.austarnet.com.au/paul1/vr/mkcramfs249.tar.gz
uncramfs & sources: http://agenda.fatcathk.com/romdisk/uncramfs-0.6.tar.gz


AUTHOR 1: I hear if you play the NT 4.0 CD backwards, you get a Satanic message.
AUTHOR 2: That's nothing. If you play it forward, it installs NT 4.0.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

             reply	other threads:[~2002-05-26 20:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-26 22:37 gmx [this message]
2002-05-27  7:03 ` Stuart Brady
  -- strict thread matches above, loose matches on Subject: below --
2002-05-25 21:17 gmx

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=GCEKJAPMFCCHLBOOCMIBIEMBCLAA.for_spam@gmx.de \
    --to=for_spam@gmx.de \
    --cc=cygwin@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).