Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Michal Suchanek
On 12 April 2010 20:13, Szymon Janc  wrote:
> Dnia poniedziałek 12 kwiecień 2010 o 19:30:00 Vladimir 'φ-coder/phcoder'
> Serbinenko napisał(a):
>> > You can also buffer the block offsets so that you can seek in the part
>> > of the file you have seen already.
>>
>> Decompressor is stateful so you'll need to save the sate as well which
>> may eat more RAM than decompressing the whole uncompressed file. It also
>> doesn't solve the issue of retrieving e.g. the last character from
>> compressed file without retrieving all preceding ones
>
> I think that Michal was refering to cache already read blocks metadata (which
> is not a bad idea if file is often seek back and forward).

I am not sure we are talking about the same thing here.

Most compression formats don't compress the whole file, they compress
only fixed sized parts of the file = blocks. This is because there is
a fixed limit on the dictionary size and other technical reasons. The
other reason is that if you have a tar archive or something like that
it looks differently in different places so applying blanket
compression to the whole thing might not be that much of a win anyway.

So you could seek in the file if you knew where these blocks start but
they are different size after compression and  it is not required to
store an index in the compressed file (and probably is not in most) as
the next block simply starts after the previous one and you know the
previous block ended when you finish decompressing it. However, there
is no reason to throw away the information once you obtain it by
decompressing some blocks.

I guess there is no more metadata to be gained at this level but you
could mean other blocks at some other level.

Thanks

Michal


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: escape strings in grub.cfg

2010-04-12 Thread Colin Watson
On Mon, Apr 12, 2010 at 12:23:01PM -0500, richardvo...@gmail.com wrote:
> On Sun, Apr 11, 2010 at 7:09 PM, Colin Watson  wrote:
> > On Sat, Apr 10, 2010 at 10:10:15PM +0100, Carles Pina i Estany wrote:
> >> +gettext_escape_double_quotes ()
> >> +{
> >> +  echo -n $(gettext $@) | sed 's/\"/\\\"/'
> >> +}
> >
> > This is underquoted, and in any case the 'echo -n' is redundant since
> > gettext itself already writes to standard output and $() substitution
> > strips trailing newlines.  $@ requires special treatment, and that sed
> > s/// command needs /g.  With my suggestion, I'd recommend:
> >
> >  gettext_quoted () {
> >    gettext "$@" | sed "s/'/'''/g"
> >  }
> 
> I haven't tried it myself, but you just said the newline is stripped
> by $() and then took out the $(), seems like the newline would be
> present again.

In context, gettext_quoted would always be called from inside $(), so
this isn't a problem.

(In general I find that it's best to write shell functions such that
they emit trailing newlines on their output, and let the caller strip it
if necessary; this usually comes out quite naturally.  Of course there
are exceptions.)

-- 
Colin Watson   [cjwat...@ubuntu.com]


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Michal Suchanek
2010/4/12 Vladimir 'φ-coder/phcoder' Serbinenko :
>
>> You can also buffer the block offsets so that you can seek in the part
>> of the file you have seen already.
>>
>>
> Decompressor is stateful so you'll need to save the sate as well which
> may eat more RAM than decompressing the whole uncompressed file. It also
> doesn't solve the issue of retrieving e.g. the last character from
> compressed file without retrieving all preceding ones

No, the compressed blocks should be separate. Otherwise they would not
be blocks. There is stuff like bzip2recover which would not work
otherwise.

And yes, reading the last character from a file is not solved by this
but you want ascii characters first and those are at the start so the
perceived startup time should be shorter.

Thanks

Michal


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Szymon Janc
Dnia poniedziałek 12 kwiecień 2010 o 19:30:00 Vladimir 'φ-coder/phcoder' 
Serbinenko napisał(a):
> > You can also buffer the block offsets so that you can seek in the part
> > of the file you have seen already.
> 
> Decompressor is stateful so you'll need to save the sate as well which
> may eat more RAM than decompressing the whole uncompressed file. It also
> doesn't solve the issue of retrieving e.g. the last character from
> compressed file without retrieving all preceding ones

I think that Michal was refering to cache already read blocks metadata (which 
is not a bad idea if file is often seek back and forward).

-- 
Szymon K. Janc
szy...@janc.net.pl // GG: 1383435


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] --foo bar cmdline argument parsing support for grub-* scripts

2010-04-12 Thread BVK Chaitanya
Updated patch which prints getopt like error message for missing
option-parameters (like in grub-mkrescue -o) is attached.  Its been
pushed into branches/fix-cmdline-arg-parsing as well.





-- 
bvk.chaitanya
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: bvk.gro...@gmail.com-20100412160303-6jybcf4eb75thcj3
# target_branch: file:///home/bvk/Work/grub2/mainline/
# testament_sha1: ff33d30449069fb834a529fa1960a74052916fa3
# timestamp: 2010-04-12 21:33:14 +0530
# base_revision_id: phco...@gmail.com-20100410231431-bddwdlx8sh5oa2j2
# 
# Begin patch
=== modified file 'util/grub-install.in'
--- util/grub-install.in	2010-04-03 18:52:06 +
+++ util/grub-install.in	2010-04-12 16:03:03 +
@@ -105,8 +105,23 @@
 EOF
 }
 
+argument () {
+  opt=$1
+  shift
+
+  if test $# -eq 0; then
+  echo "$0: option requires an argument -- '$opt'" 1>&2
+  exit 1
+  fi
+  echo $1
+}
+
 # Check the arguments.
-for option in "$@"; do
+while test $# -gt 0
+do
+option=$1
+shift
+
 case "$option" in
 -h | --help)
 	usage
@@ -114,33 +129,62 @@
 -v | --version)
 	echo "grub-install (GNU GRUB ${PACKAGE_VERSION})"
 	exit 0 ;;
+
+--modules)
+	modules=`argument $option "$@"`; shift;;
 --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
+
+--font)
+	font=`argument $option "$@"`; shift;;
 --font=*)
 	font=`echo "$option" | sed 's/--font=//'` ;;
+
+--root-directory)
+	rootdir=`argument $option "$@"`; shift;;
 --root-directory=*)
 	rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;
+
+--grub-setup)
+	grub_setup=`argument $option "$@"`; shift;;
 --grub-setup=*)
 	grub_setup=`echo "$option" | sed 's/--grub-setup=//'` ;;
+
+--grub-mkimage)
+	grub_mkimage=`argument $option "$@"`; shift;;
 --grub-mkimage=*)
 	grub_mkimage=`echo "$option" | sed 's/--grub-mkimage=//'` ;;
+
+--grub-mkdevicemap)
+	grub_mkdevicemap=`argument $option "$@"`; shift;;
 --grub-mkdevicemap=*)
 	grub_mkdevicemap=`echo "$option" | sed 's/--grub-mkdevicemap=//'` ;;
+
+--grub-probe)
+	grub_probe=`argument $option "$@"`; shift;;
 --grub-probe=*)
 	grub_probe=`echo "$option" | sed 's/--grub-probe=//'` ;;
+
 --no-floppy)
 	no_floppy="--no-floppy" ;;
 --recheck)
 	recheck=yes ;;
+
+--disk-module)
+	if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
+	disk_module=`argument $option "$@"`; shift;
+	fi ;;
 --disk-module=*)
 	if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then
disk_module=`echo "$option" | sed 's/--disk-module=//'`
 fi ;;
+
 # This is an undocumented feature...
 --debug)
 	debug=yes ;;
 -f | --force)
 setup_force="--force" ;;
+
 -*)
 	echo "Unrecognized option \`$option'" 1>&2
 	usage

=== modified file 'util/grub-mkconfig.in'
--- util/grub-mkconfig.in	2010-04-09 15:37:38 +
+++ util/grub-mkconfig.in	2010-04-12 16:03:03 +
@@ -49,8 +49,23 @@
 EOF
 }
 
+argument () {
+  opt=$1
+  shift
+
+  if test $# -eq 0; then
+  echo "$0: option requires an argument -- '$opt'" 1>&2
+  exit 1
+  fi
+  echo $1
+}
+
 # Check the arguments.
-for option in "$@"; do
+while test $# -gt 0
+do
+option=$1
+shift
+
 case "$option" in
 -h | --help)
 	usage
@@ -58,10 +73,8 @@
 -v | --version)
 	echo "$0 (GNU GRUB ${package_version})"
 	exit 0 ;;
--o)
-	shift
-	grub_cfg=$1
-	;;
+-o | --output)
+	grub_cfg=`argument $option "$@"`; shift;;
 --output=*)
 	grub_cfg=`echo "$option" | sed 's/--output=//'`
 	;;
@@ -70,6 +83,10 @@
 	usage
 	exit 1
 	;;
+*)
+	echo "Invalid parameter, $option" 1>&2
+	exit 1
+	;;
 esac
 done
 

=== modified file 'util/grub-mkrescue.in'
--- util/grub-mkrescue.in	2010-04-09 18:40:14 +
+++ util/grub-mkrescue.in	2010-04-12 16:03:03 +
@@ -42,8 +42,8 @@
 
   -h, --help  print this message and exit
   -v, --version   print the version information and exit
+  -o, --output=FILE   save output in FILE [required]
   --modules=MODULES   pre-load specified modules MODULES
-  --output=FILE   save output in FILE [required]
 
 $0 generates a bootable rescue image with specified source files or directories.
 
@@ -51,8 +51,23 @@
 EOF
 }
 
+argument () {
+  opt=$1
+  shift
+
+  if test $# -eq 0; then
+  echo "$0: option requires an argument -- '$opt'" 1>&2
+  exit 1
+  fi
+  echo $1
+}
+
 # Check the arguments.
-for option in "$@"; do
+while test $# -gt 0
+do
+option=$1
+shift
+
 case "$option" in
 -h | --help)
 	usage
@@ -60,11 +75,24 @@
 -v | --version)
 	echo "$0 (GNU GRUB ${PACKAGE_VERSION})"
 	exit 0 ;;
+
+--modules)
+modules=`argument $option "$@"`; shift ;;
 --modules=*)
 	modules=`echo "$option" | sed 's/--modules=//'` ;;
+
+-o | --output)
+	output_image=`argument $option "$@"`; shift ;;
 --output=*)
 	output_image=`echo "$option" | sed 's/--output=//'` ;;
+
 # Intentionally undocumented
+--override-directory)
+override_dir=`argument $optio

Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Vladimir 'φ-coder/phcoder' Serbinenko

> You can also buffer the block offsets so that you can seek in the part
> of the file you have seen already.
>
>   
Decompressor is stateful so you'll need to save the sate as well which
may eat more RAM than decompressing the whole uncompressed file. It also
doesn't solve the issue of retrieving e.g. the last character from
compressed file without retrieving all preceding ones
> Thanks
>
> Michal
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
>   


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Michal Suchanek
On 12 April 2010 17:50, Szymon Janc  wrote:
> On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett  wrote
>
>> > This issue should be handled at compress time by choosing to compress
>> > by blocks of desired size. This way font layer doesn't need to care
>> > anymore.
>>
>> But can you randomly seek to an block transparently and read it that
>> way?
>
> Maybe not fully randomly, but jumping by blocks will be quite fast even if 
> file
> was seeked backward when one must start from begining of file(at least with
> xz). I don't know if jumping block backward is available in gzip, probably 
> not.
>
> If block size would be chosen wisely it should be possible to buffer block
> (uncompressed) data and there should be quite a big chance that data locality
> will minimize need for jumping (and decompression). Everything fully

You can also buffer the block offsets so that you can seek in the part
of the file you have seen already.

Thanks

Michal


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: escape strings in grub.cfg

2010-04-12 Thread richardvo...@gmail.com
On Sun, Apr 11, 2010 at 7:09 PM, Colin Watson  wrote:
> On Sat, Apr 10, 2010 at 10:10:15PM +0100, Carles Pina i Estany wrote:
>> Last weekend, the Asturian team found a bug in Grub. Thanks for the
>> debugging. The string that appears in grub.cfg for "Loading the initram"
>> in Asturian is "Cargando'l discu RAM inicial...". So grub.cfg looks
>> like:
>>         echo    Cargando'l discu RAM inicial...
>>
>> This is syntactically invalid because the character "'".
>>
>> Easy work around: generate the line like:
>>       echo    "Cargando'l discu RAM inicial..."
>>
>> New problem: in some language, this string could have a double quote
>> inside.
>>
>> New solution: escape the double quotes strings when they are used in
>> gettext and always use these strings with double quotes.
>>
>> See the attached patch.
>>
>> I'm not convinced of the patch, does anybody has a cleaner idea/patch?
>
> This doesn't cover everything - you've just moved the goalposts a bit.
> Here's the relevant bit of the lexer:
>
> {
>  \'            {
>                  yy_pop_state (yyscanner);
>                  ARG (GRUB_SCRIPT_ARG_TYPE_SQSTR);
>                }
>  [^\']+        { COPY (yytext, yyleng); }
> }
>
> {
>  \"            {
>                  yy_pop_state (yyscanner);
>                  ARG (GRUB_SCRIPT_ARG_TYPE_DQSTR);
>                }
>  \$            {
>                  yy_push_state (VAR, yyscanner);
>                  ARG (GRUB_SCRIPT_ARG_TYPE_DQSTR);
>                }
>            { COPY ("\\", 1); }
>  \\\"          { COPY ("\"", 1); }
>  \\\n          { /* ignore */ }
>  [^\"$\\\n]+   { COPY (yytext, yyleng); }
>  (.|\n)        { COPY (yytext, yyleng); }
> }
>
> In other words, only ' is special (as a terminator) when reading a
> single-quoted string, and the sequences " $ \\ \" \n are special inside
> a double-quoted string.  (Incidentally, I think there's another bug
> here; if $ is special, \$ should be special as well.)
>
> Given this, wouldn't you be better off using single-quotes instead?
> You'd then end up with:
>
>          echo    'Cargando'\''l discu RAM inicial...'
>
> ... where the construction used to escape ' is "close quotes, literal ',
> reopen quotes".  (Tested in grub-emu.)
>
>> +gettext_escape_double_quotes ()
>> +{
>> +  echo -n $(gettext $@) | sed 's/\"/\\\"/'
>> +}
>
> This is underquoted, and in any case the 'echo -n' is redundant since
> gettext itself already writes to standard output and $() substitution
> strips trailing newlines.  $@ requires special treatment, and that sed
> s/// command needs /g.  With my suggestion, I'd recommend:
>
>  gettext_quoted () {
>    gettext "$@" | sed "s/'/'''/g"
>  }

I haven't tried it myself, but you just said the newline is stripped
by $() and then took out the $(), seems like the newline would be
present again.


>
> ... and then make sure it's enclosed in '' rather than "" wherever it's
> used (or modify the sed to put single-quotes at the start and end, if
> that works out neater).
>
> --
> Colin Watson                                       [cjwat...@ubuntu.com]
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: escape strings in grub.cfg

2010-04-12 Thread BVK Chaitanya
On Mon, Apr 12, 2010 at 5:39 AM, Colin Watson  wrote:
>
> In other words, only ' is special (as a terminator) when reading a
> single-quoted string, and the sequences " $ \\ \" \n are special inside
> a double-quoted string.  (Incidentally, I think there's another bug
> here; if $ is special, \$ should be special as well.)
>


Nice catch!  There is indeed a bug.  We cannot escape $ in dquote
strings currently, this needs to be fixed.




-- 
bvk.chaitanya


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Michal Suchanek
On 12 April 2010 17:50, Szymon Janc  wrote:
> On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett  wrote
>
>> > This issue should be handled at compress time by choosing to compress
>> > by blocks of desired size. This way font layer doesn't need to care
>> > anymore.
>>
>> But can you randomly seek to an block transparently and read it that
>> way?
>
> Maybe not fully randomly, but jumping by blocks will be quite fast even if 
> file
> was seeked backward when one must start from begining of file(at least with
> xz). I don't know if jumping block backward is available in gzip, probably 
> not.
>
> If block size would be chosen wisely it should be possible to buffer block
> (uncompressed) data and there should be quite a big chance that data locality
> will minimize need for jumping (and decompression). Everything fully

You can also buffer the block offsets so that you can seek in the part
of the file you have seen already.

Thanks

Michal


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Szymon Janc
On Mon, 12 Apr 2010 07:24:09 -0700 Colin D Bennett  wrote

> > This issue should be handled at compress time by choosing to compress
> > by blocks of desired size. This way font layer doesn't need to care
> > anymore.
> 
> But can you randomly seek to an block transparently and read it that
> way?

Maybe not fully randomly, but jumping by blocks will be quite fast even if file
was seeked backward when one must start from begining of file(at least with
xz). I don't know if jumping block backward is available in gzip, probably not.

If block size would be chosen wisely it should be possible to buffer block
(uncompressed) data and there should be quite a big chance that data locality
will minimize need for jumping (and decompression). Everything fully
transparent for caller. If You add compressed data buffering (sth like
compressed_data->bufio->decompressor->decompressed_block_buffer->caller) this
should work quite nicely.

As I've mentioned in my post about xz compression, I'll try to propose some
sollution fot that in the near future.


-- 
Szymon Janc
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


[PATCHv3] a new filesystem module for nilfs2

2010-04-12 Thread Jiro SEKIBA
Hi,

This is a revised patch to support nilfs2, a log file system.
The patch is basically just a retrofit of the one I sent before
against current tree.

I've checked it both on qemu and qemu-system-ppc with grub-fstest.

Thanks,

Regards,
-- 
Jiro SEKIBA 

=== modified file 'conf/common.rmk'
--- conf/common.rmk 2010-04-10 23:14:31 +
+++ conf/common.rmk 2010-04-12 20:21:15 +
@@ -31,9 +31,9 @@
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
-   fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c  \
-   fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c\
-   fs/befs.c fs/befs_be.c fs/tar.c \
+   fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c   \
+   fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c   \
+   fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \
\
partmap/msdos.c partmap/bsdlabel.c partmap/apple.c \
partmap/sun.c partmap/sunpc.c partmap/gpt.c \
@@ -69,7 +69,7 @@
\
fs/affs.c fs/cpio.c fs/fat.c fs/ext2.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
-   fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c  \
+   fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c  \
fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c fs/befs.c  \
fs/befs_be.c fs/tar.c   \
\
@@ -298,6 +298,12 @@
 minix_mod_CFLAGS = $(COMMON_CFLAGS)
 minix_mod_LDFLAGS = $(COMMON_LDFLAGS)
 
+# For nilfs2.mod.
+pkglib_MODULES += nilfs2.mod
+nilfs2_mod_SOURCES = fs/nilfs2.c
+nilfs2_mod_CFLAGS = $(COMMON_CFLAGS)
+nilfs2_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
 # For hfs.mod.
 hfs_mod_SOURCES = fs/hfs.c
 hfs_mod_CFLAGS = $(COMMON_CFLAGS)

=== modified file 'conf/i386-pc.rmk'
--- conf/i386-pc.rmk2010-04-10 23:14:31 +
+++ conf/i386-pc.rmk2010-04-12 20:21:15 +
@@ -82,9 +82,9 @@
\
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c  \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c   \
-   fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c   \
-   fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c \
-   fs/befs.c fs/befs_be.c fs/tar.c \
+   fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c   \
+   fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c   \
+   fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \
\
partmap/msdos.c partmap/bsdlabel.c partmap/sunpc.c  \
partmap/gpt.c   \

=== modified file 'conf/sparc64-ieee1275.rmk'
--- conf/sparc64-ieee1275.rmk   2010-04-10 23:14:31 +
+++ conf/sparc64-ieee1275.rmk   2010-04-12 20:21:15 +
@@ -57,9 +57,9 @@
\
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
fs/hfsplus.c fs/iso9660.c fs/udf.c fs/jfs.c fs/minix.c  \
-   fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c  \
-   fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c fs/afs_be.c\
-   fs/befs.c fs/befs_be.c fs/tar.c \
+   fs/nilfs2.c fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c   \
+   fs/sfs.c fs/ufs.c fs/ufs2.c fs/xfs.c fs/afs.c   \
+   fs/afs_be.c fs/befs.c fs/befs_be.c fs/tar.c \
\
partmap/amiga.c partmap/apple.c partmap/msdos.c \
partmap/bsdlabel.c partmap/sun.c partmap/acorn.c\

=== added file 'fs/nilfs2.c'
--- fs/nilfs2.c 1970-01-01 00:00:00 +
+++ fs/nilfs2.c 2010-04-12 20:21:15 +
@@ -0,0 +1,1125 @@
+/* 
+ * nilfs2.c - New Implementation of Log filesystem 
+ * Copyright (C) 2010 Jiro SEKIBA  
+ */
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2003,2004,2005,2007,2008  Free Software Foundation, Inc.
+ *
+ *  GRUB is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see .
+ */
+
+
+/* Filetype information as used in inodes.  */
+#define FILETYPE_INO_MASK  017
+#define FILETYPE_INO_REG   010
+#define FILETYPE_INO_DIRECTORY 004
+#define FILETYPE_INO_SYMLINK   012
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/** nilfs_fs.h **/
+#define NILFS_INODE_BMAP_SIZE  7
+
+#define NILFS_SUPORT_REV   2
+
+/* Magic value used to identify an nilfs2 filesystem.  */
+#defineNILFS2_SUPE

Re: Compilation error of xorriso on MacOSX

2010-04-12 Thread Thomas Schmitt
Hi,

> when i've tried to compile xorriso on MacOSX 10.6.2
> i have this error during
> the link:
> Undefined symbols:
>  "_history_list", referenced from:
>   _Xorriso_status in xorriso_xorriso-xorriso.o
> ...
> If i add #undef Xorriso_with_readlinE to xorriso.c, i can compile it.

It looks as if the installed libreadline
does not provide function history_list().
I will try to add a check for this to the
configure script.


There are options for ./configure by which one
can disable libreadline and some other extra
dependencies:
--disable-libreadline
--disable-zlib avoid use of zlib functions like compress2()
--disable-libacl   avoid use of ACL functions like acl_to_text()
--disable-xattravoid use of xattr functions like listxattr()

They all get disabled automatically by configure
tests if the facility is missing at all.
But here we have a case were it is missing
only in part.
The ACL and xattr stuff is currently Linux-only.
One would probably need a system adapter layer
to make this available on other OSes.

Many thanks for giving xorriso a test.


Have a nice day :)

Thomas



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: Problem Compiling gnulib/getdelim on MacOSX

2010-04-12 Thread Colin Watson
On Mon, Apr 12, 2010 at 03:56:07PM +0200, Yves Blusseau wrote:
> when i try to compile grub 1.98 on MacOSX i have this error:
>
> gcc-4.2 -Ignulib -I./gnulib -I/opt/local/include -I. -I./include  
> -I./gnulib -I./include -Wall -W -DGRUB_LIBDIR=\"/opt/local/lib/`echo  
> grub/i386-pc | sed 's,x,x,'`\" -DLOCALEDIR=\"\" -DGRUB_MACHINE_PCBIOS=1  
> -DAPPLE_CC=1 -fnested-functions -DGRUB_UTIL=1 -Wno-undef  
> -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))"  
> -I./gnulib -DGRUB_FILE=\"gnulib/getdelim.c\" -MD -c -o  
> grub_script_check-gnulib_getdelim.o gnulib/getdelim.c
> gnulib/getdelim.c:59: error: expected '=', ',', ';', 'asm' or  
> '__attribute__' before 'getdelim'
> make: *** [grub_script_check-gnulib_getdelim.o] Error 1
>
> The problem is that the ssize_t type is not defined. We need to add  
> #include  on MacOSX like i do on my commit (r2175).
> But i know that we can't modify getdelim.c directly because is it imported.
> So if someone have an idea to solve this problem on OSX..

We should import the ssize_t module from gnulib, which adds a configure
macro for this.  The way grub uses gnulib is a bit odd, though, so it's
not something I'd feel comfortable with just fixing; it needs somebody
more familiar with it.  After we switch to automake (a prerequisite),
could we switch to using gnulib-tool for the gnulib import as well, so
that this becomes a bit more standard?

-- 
Colin Watson   [cjwat...@ubuntu.com]


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Colin D Bennett
On Mon, 12 Apr 2010 09:31:56 +0200
Vladimir 'φ-coder/phcoder' Serbinenko  wrote:

> 
> >> Mixing compression and font engine will make the code more complex
> >> and bug prone. It's better to put compression layer below the font
> >> and make font subsystem unaware of it. The only exception is if
> >> compression takes advantage of knowing font structures.
> >> 
> >
> > My aim was to make it more practical to have full Unicode fonts of a
> > decent size.  Compressing the font would greatly decrease the disk
> > space required, but if the entire font file was compressed using,
> > for instance, GZip, then (generally speaking) the entire file would
> > have to be decompressed to use the font.  This would probably make
> > it far too slow to display the GRUB menu when a few fonts were
> > loaded.
> >
> > In my thoughts on font compression, there are a couple of opposing
> > factors:
> >
> > - Compressing too little data produces poorer compression since
> > there is less redundancy to eliminate.  Consider the extreme case of
> > compressing each glyph by itself with GZip.
> >
> > - Compressing too much data means that more time is spent
> > decompressing glyphs at runtime that will not be used (in general, a
> > small fraction a Unicode font would be used at once in GRUB).
> > Consider the extreme case of compressing the entire font as a
> > single unit with GZip.
> >
> >   
> This issue should be handled at compress time by choosing to compress
> by blocks of desired size. This way font layer doesn't need to care
> anymore.

But can you randomly seek to an block transparently and read it that
way?

Regards,
Colin


signature.asc
Description: PGP signature
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Problem Compiling gnulib/getdelim on MacOSX

2010-04-12 Thread Yves Blusseau

 Hi,

when i try to compile grub 1.98 on MacOSX i have this error:

gcc-4.2 -Ignulib -I./gnulib -I/opt/local/include -I. -I./include 
-I./gnulib -I./include -Wall -W -DGRUB_LIBDIR=\"/opt/local/lib/`echo 
grub/i386-pc | sed 's,x,x,'`\" -DLOCALEDIR=\"\" -DGRUB_MACHINE_PCBIOS=1 
-DAPPLE_CC=1 -fnested-functions -DGRUB_UTIL=1 -Wno-undef 
-Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" 
-I./gnulib -DGRUB_FILE=\"gnulib/getdelim.c\" -MD -c -o 
grub_script_check-gnulib_getdelim.o gnulib/getdelim.c
gnulib/getdelim.c:59: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'getdelim'

make: *** [grub_script_check-gnulib_getdelim.o] Error 1

The problem is that the ssize_t type is not defined. We need to add 
#include  on MacOSX like i do on my commit (r2175).

But i know that we can't modify getdelim.c directly because is it imported.
So if someone have an idea to solve this problem on OSX..

Regards,
Yves Blusseau




smime.p7s
Description: S/MIME Cryptographic Signature
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Problem compiling grub 1.98 on MacOSX

2010-04-12 Thread Yves Blusseau

 Hi,

i have an error when trying to compile grub 1.98 on MacOSX 10.6.2:

gcc-4.2 -Iboot/i386/pc -I./boot/i386/pc -I./include -I. -I./include 
-Wall -W -DASM_FILE=1 -nostdinc -fno-builtin  -Os 
-DGRUB_MACHINE_PCBIOS=1 -Wall -W -Wshadow -Wpointer-arith 
-Wmissing-prototypes-Wundef -Wstrict-prototypes -g 
-falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse 
-mno-sse2 -mno-3dnow -DAPPLE_CC=1 -fnested-functions -m32 -m32  
-DGRUB_FILE=\"boot/i386/pc/diskboot.S\" -MD -c -o 
diskboot_img-boot_i386_pc_diskboot.o boot/i386/pc/diskboot.S
gcc-4.2 -o diskboot.exec diskboot_img-boot_i386_pc_diskboot.o -nostdlib  
-m32  -nostdlib -nostdlib -static -Wl,-preload -Wl,-segalign,20 
-Wl,-image_base,0x8000
ld_classic: diskboot_img-boot_i386_pc_diskboot.o illegal reference to 
debug section, from non-debug section (__TEXT,__text) via relocation 
entry (5) to section (__DWARF,__debug_line)

collect2: ld returned 1 exit status
make: *** [diskboot.exec] Error 1


If i had .byte 0 at the end of boot/i386/pc/diskboot.S the error is 
removed but the size of diskboot.img is 544 bytes instead of 512.


Best regards,
Yves Blusseau




smime.p7s
Description: S/MIME Cryptographic Signature
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Font antialiasing v2

2010-04-12 Thread Vladimir 'φ-coder/phcoder' Serbinenko

>> Mixing compression and font engine will make the code more complex and
>> bug prone. It's better to put compression layer below the font and
>> make font subsystem unaware of it. The only exception is if
>> compression takes advantage of knowing font structures.
>> 
>
> My aim was to make it more practical to have full Unicode fonts of a
> decent size.  Compressing the font would greatly decrease the disk
> space required, but if the entire font file was compressed using, for
> instance, GZip, then (generally speaking) the entire file would
> have to be decompressed to use the font.  This would probably make it
> far too slow to display the GRUB menu when a few fonts were loaded.
>
> In my thoughts on font compression, there are a couple of opposing
> factors:
>
> - Compressing too little data produces poorer compression since there
> is less redundancy to eliminate.  Consider the extreme case of
> compressing each glyph by itself with GZip.
>
> - Compressing too much data means that more time is spent
> decompressing glyphs at runtime that will not be used (in general, a
> small fraction a Unicode font would be used at once in GRUB).  Consider
> the extreme case of compressing the entire font as a single unit with
> GZip.
>
>   
This issue should be handled at compress time by choosing to compress by
blocks of desired size. This way font layer doesn't need to care anymore.
> By compressing blocks of characters, where each block contains a number
> of characters that represents a compromise between too little data for
> good compression on disk and too much data for wasted time decompressing
> unused glyphs, good compression and good runtime performance can be
> attained.
>   

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko




signature.asc
Description: OpenPGP digital signature
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel