Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "gmx" To: Subject: AW: mkcramfs under cygwin ?? Date: Sat, 27 Apr 2002 01:09:56 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <000001c204f9$3a47b160$0200a8c0@sknet01> thanks "CM" , but that doesn't seem to help perhaps this is interesting: only symlinks which point to different directories get garbled. under cygwin: Administrator AT CELERON300A /tmp/netstation-0.8/pkg-tree/base $ ls -al total 36 drwxr-xr-x 9 Administ Kein 4096 Apr 26 22:42 . drwxr-xr-x 67 Administ Kein 16384 Apr 26 22:43 .. drwxr-xr-x 2 Administ Kein 8192 Apr 26 22:42 bin drwxr-xr-x 2 Administ Kein 0 May 10 2002 dev drwxr-xr-x 3 Administ Kein 4096 May 14 2002 etc drwxr-xr-x 5 Administ Kein 4096 Apr 26 22:42 lib lrwxrwxrwx 1 Administ Kein 102 Apr 26 22:42 linuxrc -> bin/busybox drwxr-xr-x 2 Administ Kein 0 Nov 24 2000 proc drwxr-xr-x 2 Administ Kein 0 Dec 12 2000 root lrwxrwxrwx 1 Administ Kein 86 Apr 26 22:42 sbin -> bin drwxr-xr-x 2 Administ Kein 0 Nov 25 2000 tmp lrwxrwxrwx 1 Administ Kein 86 Apr 26 22:42 usr -> tmp lrwxrwxrwx 1 Administ Kein 94 Apr 26 22:42 var -> tmp/var this is the "base"-dir compressed with mkcramfs under windows, transferred to linux and mounted there: linux:/mnt # ls -al drwxr-xr-x 1 vmware bin 736 Apr 27 00:10 bin drwxr-xr-x 1 vmware bin 36 Apr 27 00:44 dev drwxr-xr-x 1 vmware bin 452 Apr 9 16:55 etc drwxr-xr-x 1 vmware bin 392 Apr 26 23:49 lib lrwxrwxrwx 1 vmware bin 102 Apr 27 00:44 linuxrc -> bin/busybox?? drwxr-xr-x 1 vmware bin 0 Apr 9 17:11 proc drwxr-xr-x 1 vmware bin 0 Apr 27 00:44 root lrwxrwxrwx 1 vmware bin 86 Jan 1 1970 sbin -> binaÐ??aà(??ø)???+??Ð,??è-?? drwxr-xr-x 1 vmware bin 0 Apr 27 00:30 tmp lrwxrwxrwx 1 vmware bin 86 Apr 27 00:30 usr -> tmpa Ý??n\tmp\netstation-0.8\pkg-tree\base\tmp\* lrwxrwxrwx 1 vmware bin 94 Apr 27 00:30 var -> tmp/vara usr -> tmpa Ý??n\tmp\netstation-0.8\pkg-tree\base\tmp\* interesting stuff - there are BACKSLASHES inside !!! Is this some memory-fragment which got incorrectly referenced when mkcramfs'sing the dir? (we know - f...n C and that pointer stuff...) ;) ? "simple" symlinks are just ok.... linux:/mnt/bin # ls -la -rw-r--r-- 1 vmware bin 90736 Apr 27 00:45 ash lrwxrwxrwx 1 vmware bin 86 Apr 27 00:45 bash -> ash -rw-r--r-- 1 vmware bin 102556 Apr 27 00:45 busybox lrwxrwxrwx 1 vmware bin 94 Apr 27 00:45 cat -> busybox lrwxrwxrwx 1 vmware bin 94 Jan 1 1970 clear -> busybox lrwxrwxrwx 1 vmware bin 94 Jan 1 1970 date -> busybox -rw-r--r-- 1 vmware bin 32896 Jan 1 1970 dhcpcd lrwxrwxrwx 1 vmware bin 94 Jan 1 1970 echo -> busybox lrwxrwxrwx 1 vmware bin 94 Jan 1 1970 grep -> busybox lrwxrwxrwx 1 vmware bin 94 Jan 1 1970 gunzip -> busybox any further hints how to get this "debugged" ? regards Roland -----Ursprüngliche Nachricht----- Von: CM [mailto:cmml AT btinternet DOT com] Gesendet: Sonntag, 26. Mai 2002 23:07 An: 'gmx' Betreff: RE: mkcramfs under cygwin ?? I don’t know much about cygwin, but I would guess that this is because of cygwin not supporting 64-bit fie io. You might want to try "typedef long off_t;" instead of "long long". CM -----Original Message----- From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of gmx Sent: 26 April 2002 21:59 To: cygwin AT cygwin DOT com Subject: mkcramfs under cygwin ?? 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/ -- 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/