Mel Flynn wrote:
On Sunday 28 June 2009 15:41:49 Alan Cox wrote:
Wojciech Puchar wrote:
how can i check how much (or maybe - what processes) 2MB pages are
actually allocated?
I'm afraid that you can't with great precision. For a given program
execution, on an otherwise
i am not able to made rcpbind,
i get an error while making the rcpbind
like this
RPC: Unknown host
showmount: can't do exports rpc
Thanks in advance
--
S.MALATHI
___
freebsd-hackers@freebsd.org mailing list
hi there,
i need to output the header of a file to stdout. the header looks like this:
struct Header
{
u_int8_t rom_entry[4];
u_int8_t nintendo_logo[156];
u_char game_title[12];
u_char game_code[4];
u_char maker_code[2];
u_int8_t fixed_val;
On Tue, 2009-06-30 at 18:12 +0200, Alexander Best wrote:
hi there,
i need to output the header of a file to stdout. the header looks like this:
struct Header
{
u_int8_t rom_entry[4];
u_int8_t nintendo_logo[156];
u_char game_title[12];
u_char
thanks. but that simply dumps the contents of the struct to stdout. but since
most of the struct's contents aren't ascii the output isn't really of much
use.
cheers.
Tom Evans schrieb am 2009-06-30:
On Tue, 2009-06-30 at 18:12 +0200, Alexander Best wrote:
hi there,
i need to output the
that works, but i really want to have a pretty output to stdout. i guess i
have to stick with printf and use `for (i=0; i sizeof(XXX); i++)` for each
array in the struct. just thought i could avoid it.
btw. `./my-program | hexdump` works, but if i do `./my-program output`
output is being
2009/6/30 Alexander Best alexbes...@math.uni-muenster.de:
that works, but i really want to have a pretty output to stdout. i guess i
have to stick with printf and use `for (i=0; i sizeof(XXX); i++)` for each
array in the struct. just thought i could avoid it.
btw. `./my-program | hexdump`
should be stdout.
struct Header *hdr = rom;
int new_fd = open(/dev/stdout, O_RDWR);
printf(SIZE: %d\n,sizeof(*hdr));
write(new_fd, hdr, sizeof(*hdr));
close(new_fd);
Igor Mozolevsky schrieb am 2009-06-30:
2009/6/30 Alexander Best alexbes...@math.uni-muenster.de:
that works, but i really
On Tue, Jun 30, 2009 at 08:03:21PM +0200, Alexander Best wrote:
should be stdout.
struct Header *hdr = rom;
int new_fd = open(/dev/stdout, O_RDWR);
printf(SIZE: %d\n,sizeof(*hdr));
write(new_fd, hdr, sizeof(*hdr));
close(new_fd);
Why are you reopening stdout? It should already be
2009/6/30 Alexander Best alexbes...@math.uni-muenster.de:
thanks. but that simply dumps the contents of the struct to stdout. but since
most of the struct's contents aren't ascii the output isn't really of much
use.
How about ./your-program | hexdump ?
--
Igor
2009/6/30 Alexander Best alexbes...@math.uni-muenster.de:
should be stdout.
struct Header *hdr = rom;
int new_fd = open(/dev/stdout, O_RDWR);
printf(SIZE: %d\n,sizeof(*hdr));
write(new_fd, hdr, sizeof(*hdr));
close(new_fd);
You should really be checking what open returns, opening
thanks. now the output gets redirected using . i'm quite new to programming
under unix. sorry for the inconvenience.
so i guess there is no really easy way to output an inhomogeneous struct to
stdout without using a loop to output each array contained in the struct.
cheers.
Rick C. Petty
On Tue, Jun 30, 2009 at 08:21:03PM +0200, Alexander Best wrote:
thanks. now the output gets redirected using . i'm quite new to programming
under unix. sorry for the inconvenience.
No problem; we all had to learn sometime. But what I suggested should
work for every platform that adheres to
On Tuesday 30 June 2009 00:24:00 Alan Cox wrote:
Mel Flynn wrote:
On Sunday 28 June 2009 15:41:49 Alan Cox wrote:
Wojciech Puchar wrote:
how can i check how much (or maybe - what processes) 2MB pages are
actually allocated?
I'm afraid that you can't with great precision. For a given
Hey Alex,
People frown on macros, but this could be a good one:
#define SPRINT(f, fmt) \
do {\
for (_i = 0; _i sizeof(f)/sizeof(f[0]); i++) \
printf(fmt, f[i]); \
}while(0)
:D
This should allow you to point to any _array_ and print each
wow. thanks. that's looking really nice. i'll change my sources tomorrow after
a good dose of sleep. ;)
alex
Alfred Perlstein schrieb am 2009-07-01:
Hey Alex,
People frown on macros, but this could be a good one:
#define SPRINT(f, fmt) \
do {\
for (_i = 0; _i
16 matches
Mail list logo