On Wed, 01 Jul 2009 00:06:05 +0200 (CEST), Alexander Best
alexbes...@math.uni-muenster.de wrote:
thanks for all the help. i decided to take the pill and coded all the
fprintfs by hand. here's the result. usually i'd stick to a higher
level languag, but i need C's inline assembly support:
2009/7/4 Giorgos Keramidas keram...@ceid.upatras.gr:
[snip]
s/0x%/%#.2hh/g
--
Igor
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to
Alexander Best alexbes...@math.uni-muenster.de writes:
for (i=0; i sizeof(hdr-nintendo_logo); i++)
fprintf(stderr, %x, hdr-nintendo_logo[i]);
What will this print if nintendo_logo is { 0x01, 0x02, 0x03, 0x04 }?
DES
--
Dag-Erling Smørgrav - d...@des.no
2009/7/2 Dag-Erling Smørgrav d...@des.no:
Alexander Best alexbes...@math.uni-muenster.de writes:
for (i=0; i sizeof(hdr-nintendo_logo); i++)
fprintf(stderr, %x, hdr-nintendo_logo[i]);
What will this print if nintendo_logo is { 0x01, 0x02, 0x03, 0x04 }?
Good catch. It will print
On Tue, Jun 30, 2009 at 7:54 PM, Alfred Perlsteinalf...@freebsd.org wrote:
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]); \
On Tue, Jun 30, 2009 at 7:06 PM, Alexander
Bestalexbes...@math.uni-muenster.de wrote:
thanks for all the help. i decided to take the pill and coded all the fprintfs
by hand. here's the result. usually i'd stick to a higher level languag, but i
need C's inline assembly support:
struct
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
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
On Tue, Feb 17, 2009 at 05:51:13PM -0500, John Baldwin wrote:
On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote:
On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote:
On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote:
On Fri, Feb 13, 2009 at 03:55:44PM -0500,
On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote:
On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote:
__FILE__ is a string so you can't concat that with anything to produce an
identifier. In any case, the variable is static so there can't be any
collision problems with
On Tuesday 17 February 2009 5:21:42 pm Roman Divacky wrote:
On Tue, Feb 17, 2009 at 09:31:12AM -0500, John Baldwin wrote:
On Friday 13 February 2009 5:16:07 pm Roman Divacky wrote:
On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote:
__FILE__ is a string so you can't concat that
__FILE__ is a string so you can't concat that with anything to produce an
identifier. In any case, the variable is static so there can't be any
collision problems with other files.
Ryan Stone
___
freebsd-hackers@freebsd.org mailing list
On Fri, Feb 13, 2009 at 03:55:44PM -0500, Ryan Stone wrote:
__FILE__ is a string so you can't concat that with anything to produce an
identifier. In any case, the variable is static so there can't be any
collision problems with other files.
I was talking about the SYSINIT parameter. thats a
Hi,
thank you for your answer.
Clearly the Writeprocess of writeing data to an mirror is totally ended, as
all mirrordevices are written.
But for the read the kernel uses the faster device..and there it could
be an advantage.i m thinking.
And yes i think it could be an advantage, if the
Michael Schuh wrote:
Clearly the Writeprocess of writeing data to an mirror is totally ended, as
all mirrordevices are written.
But for the read the kernel uses the faster device..and there it could
be an advantage.i m thinking.
And yes i think it could be an advantage, if the
On Mon, 29 Sep 2008 10:36:46 +0200
Michael Schuh [EMAIL PROTECTED] wrote:
so we have a webserver (par example) at this mirror it has very good
speed for the file-access
(ok i know in allmost cases is not the disk the bottleneck, and if we
could doing caching...)
at the above examle it is not
Hello @all,
hello Oliver,
thnak you for your reply.
No i do not try to solve a real problem.
It was hypothetically, an idea, not more not less.
I have this written in my first posting.
And for me, it is a logical dependency that the ram get paged to the swap if
there is not enough
RAM for all
On Fri, 26 Sep 2008 20:15:43 +0200
Michael Schuh [EMAIL PROTECTED] wrote:
Let us say i have a Machine with 8 CPUs and a lot of RAM.
An i need a very high perfomance Storage for holding data.
My idea was to setup a raid1(0) with virtual disk images.
Created with mdconfig.
My idea was to
On Fri, Sep 26, 2008 at 2:15 PM, Michael Schuh [EMAIL PROTECTED]wrote:
Hallo @list,
Let us say i have a Machine with 8 CPUs and a lot of RAM.
An i need a very high perfomance Storage for holding data.
My idea was to setup a raid1(0) with virtual disk images.
Created with mdconfig.
My
Brooks Davis [EMAIL PROTECTED] writes:
APSL is not generally accepted in the base. It may be acceptable in
certain circumstances, but strong technical justification is generally
required for inclusion.
Which brings us to my reaction to the PR, which is why do we even need
this?
Stick it in
Robert Watson [EMAIL PROTECTED] writes:
I think it's a significant testament to the quality of the Solaris
parts we've been pulling in (ZFS, DTrace) that CDDL parts are now in
the base tree. They are carefully marked and isolated to make it easy
to build CDDL-free systems in the same way that
On Thu, Feb 14, 2008 at 07:39:27AM +0100, Volker wrote:
While working through the PR backlog, I found two PRs filed containing
source code for two tools (decomment, relpath) under the Apple Public
Source License (APSL).
I think these tools aren't that bad but before pinging any committer
On 02/14/08 16:02, Brooks Davis wrote:
On Thu, Feb 14, 2008 at 07:39:27AM +0100, Volker wrote:
PRs in question: bin/67307 bin/67308
The quotes on the followup are essentially correct except that explicit
approval is required by core to add new Non-BSD-Licensed code and
that there would need
On Thu, Feb 14, 2008 at 08:01:55PM +0100, Volker wrote:
On 02/14/08 16:02, Brooks Davis wrote:
On Thu, Feb 14, 2008 at 07:39:27AM +0100, Volker wrote:
PRs in question: bin/67307 bin/67308
The quotes on the followup are essentially correct except that explicit
approval is required by
On 02/14/08 20:17, Brooks Davis wrote:
APSL is not generally accepted in the base. It may be acceptable in
certain circumstances, but strong technical justification is generally
required for inclusion.
Brooks,
so better put that into the ports tree?
Thanks
Volker
On Thu, Feb 14, 2008 at 08:47:02PM +0100, Volker wrote:
On 02/14/08 20:17, Brooks Davis wrote:
APSL is not generally accepted in the base. It may be acceptable in
certain circumstances, but strong technical justification is generally
required for inclusion.
Brooks,
so better put that
On Thu, 14 Feb 2008, Volker wrote:
On 02/14/08 16:02, Brooks Davis wrote:
On Thu, Feb 14, 2008 at 07:39:27AM +0100, Volker wrote:
PRs in question: bin/67307 bin/67308
The quotes on the followup are essentially correct except that explicit
approval is required by core to add new
Quoting Volker, who wrote on Thu, Feb 14, 2008 at 08:01:55PM +0100 ..
On 02/14/08 16:02, Brooks Davis wrote:
On Thu, Feb 14, 2008 at 07:39:27AM +0100, Volker wrote:
PRs in question: bin/67307 bin/67308
The quotes on the followup are essentially correct except that explicit
approval is
Aryeh M. Friedman wrote:
I maintain a local repo of the via the cvs mode of cvsup. When I do a:
What command did you use to check out the files, and what tree are you
talking about?
cvs -q -d /home/ncvs update
It will update any modified files but will not add any new files
When you
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Doug Barton wrote:
Aryeh M. Friedman wrote:
I maintain a local repo of the via the cvs mode of cvsup. When I
do a:
What command did you use to check out the files, and what tree are
you talking about?
cvsup -h cvsup9.us.freebsd.org
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aryeh
M. Friedman
I maintain a local repo of the via the cvs mode of cvsup.
When I do a:
cvs -q -d /home/ncvs update
It will update any modified files but will not add any new
files (it
On Mon, 21 Jan 2008, Greg Larkin wrote:
cvs -q -d /home/ncvs update -d
The -d option given to the update subcommand builds directories the way cvs
checkout does. Without it, update will only operate on directories that are
already in your sandbox.
In principle you only need to specify
Subhash Gopinath wrote:
Thanks, looks interesting.
But I was looking at processing the packets in userspace. Sorry I
didn't mention it clearly.
Ah ok. I didn't get that from your initial email. Have you looked at the
firewall (ipfw and/or pf) code at all? I believe you can use mechanisms
Thanks, looks interesting.
But I was looking at processing the packets in userspace. Sorry I
didn't mention it clearly.
Thanks,
-Subhash
On Jan 11, 2008 10:32 PM, Lawrence Stewart [EMAIL PROTECTED] wrote:
Hi Subhash,
Subhash Gopinath wrote:
Hello folks,
I am looking at writing an
Hi Subhash,
Subhash Gopinath wrote:
Hello folks,
I am looking at writing an application program to tap certain ipv6 packets
(say icmpv6)
using netgraph. The application has to do some processing, before kernel can
proceed
with those packets.
I have vaguely understood netgraph, and I see that
On Thu, Jul 19, 2007 at 12:19:53PM +1000, Michael Vince typed:
I just had to deal with this limitation and it was quite annoying to say
the least, it appears Samba is somewhat deliberately designed to give
you a hard time when you run into this limit, because as soon as you add
a user to
On Wednesday 18 July 2007 21:19, Michael Vince wrote:
Julian Elischer wrote:
Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set
to 16 by default?
NFS only supports this much by default (from memory).
Samba (in the guise of
Reuben A. Popp wrote:
On Wednesday 18 July 2007 21:19, Michael Vince wrote:
Julian Elischer wrote:
Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set
to 16 by default?
NFS only supports this much by default (from memory).
Samba (in the
Julian Elischer wrote:
Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set
to 16 by default?
NFS only supports this much by default (from memory).
Samba (in the guise of Jeremy Allison)
has asked us to follow Linux's lead and support an
Angus Barrow [EMAIL PROTECTED] writes:
30 time_t timet=arh-ar_date;
(gdb) n
31 strftime(timestring, sizeof(timestring), %b %e %H:%M %Y,
gmtime(timet));
(gdb) n
...
(gdb) print timet
$1 = -1515870811
(gdb) p/x -1515870811
$1 = 0xa5a5a5a5
from malloc(3):
J Each byte of new
Angus Barrow wrote:
I'm trying to develop a BSD licensed version of the ar utility using
the new libelf library ...
The time shown in arh-ar_date (this is the struct that the libelf
library provides for each entry in the ar archive) seems to have a negative
value (using the GNU ar the
Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set to 16 by
default?
I came across this issue originally when working on our Samba implementation
(samba-3 out of ports, running on 6-STABLE). We have some users that belong
to a number of
On Tue, 05-Jun-2007 at 11:49:44 -0500, Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set to 16
by
default?
I came across this issue originally when working on our Samba implementation
(samba-3 out of ports, running on 6-STABLE). We
Reuben A. Popp wrote:
Hello all,
Can someone explain to me the rationale behind having ngroups_max set to 16 by
default?
NFS only supports this much by default (from memory).
Samba (in the guise of Jeremy Allison)
has asked us to follow Linux's lead and support an arbitrary number of
On Thu, 15 Feb 2007, Pascal Hofstee wrote:
On Thu, 2007-02-15 at 13:41 +, Robert Watson wrote:
Unfortunately, things are a bit more tricky. The problem is not so much
the API, where converting size_t/int is a relative non-event, rather, the
ABI. By changing the size of a field in a data
On 1/31/07, Robert Watson [EMAIL PROTECTED] wrote:
If we do decide to go ahead with the ABI change, there are a number of other
things that should be done simultaneously, such as changing the uid and gid
fields to uid_t and gid_t. I would very much like to see the ABI change
happen, and the
On Thu, 15 Feb 2007, Pascal Hofstee wrote:
On 1/31/07, Robert Watson [EMAIL PROTECTED] wrote:
If we do decide to go ahead with the ABI change, there are a number of
other things that should be done simultaneously, such as changing the uid
and gid fields to uid_t and gid_t. I would very much
On Thu, 2007-02-15 at 13:41 +, Robert Watson wrote:
Unfortunately, things are a bit more tricky. The problem is not so much the
API, where converting size_t/int is a relative non-event, rather, the ABI.
By
changing the size of a field in a data structure, you may change the layout
In message: [EMAIL PROTECTED]
Fabian Keil [EMAIL PROTECTED] writes:
: Robert Watson [EMAIL PROTECTED] wrote:
:
: On Wed, 31 Jan 2007, Dag-Erling Smørgrav wrote:
:
: Pascal Hofstee [EMAIL PROTECTED] writes:
: Any additional sugestions/objections are always greatly appreciated.
:
M. Warner Losh [EMAIL PROTECTED] wrote:
In message: [EMAIL PROTECTED]
Fabian Keil [EMAIL PROTECTED] writes:
: Robert Watson [EMAIL PROTECTED] wrote:
: If we do decide to go ahead with the ABI change, there are a number of
other
: things that should be done simultaneously,
On Wed, 2007-Jan-31 08:30:27 +0100, Pascal Hofstee wrote:
In a recent attempt in trying to clean up some compiler warnings in a
GNUstep related project i came upon a case where the FreeBSD datatypes
seemed to disagree with the Linux ones. Though this in itself is not
unusual i do wonder if in
Peter Jeremy wrote:
Whilst I agree that the Linux defn is the more sensible one, System V
IPC and common sense are not commonly found together. Tradionally the
definition was int. It appears that the definition changed from
int to size_t in issue 5 of the Open Group base definition but
FreeBSD
Pascal Hofstee [EMAIL PROTECTED] writes:
Any additional sugestions/objections are always greatly appreciated.
On 32-bit platforms (i386, powerpc), int is a 32-bit signed integer
while size_t is a 32-bit unsigned integer.
On 64-bit platforms (amd64, sparc64 etc), int is a 32-bit signed
integer
On Wed, 31 Jan 2007, Dag-Erling Smørgrav wrote:
Pascal Hofstee [EMAIL PROTECTED] writes:
Any additional sugestions/objections are always greatly appreciated.
On 32-bit platforms (i386, powerpc), int is a 32-bit signed integer while
size_t is a 32-bit unsigned integer.
On 64-bit platforms
Robert Watson [EMAIL PROTECTED] wrote:
On Wed, 31 Jan 2007, Dag-Erling Smørgrav wrote:
Pascal Hofstee [EMAIL PROTECTED] writes:
Any additional sugestions/objections are always greatly appreciated.
On 32-bit platforms (i386, powerpc), int is a 32-bit signed integer while
size_t is a
On Wed, 2007-Jan-31 10:52:02 +, Robert Watson wrote:
If we do decide to go ahead with the ABI change, there are a number of
other things that should be done simultaneously, such as changing the uid
and gid fields to uid_t and gid_t.
And mode to mode_t. The uid and gid fields in struct
On Mon, 27 Nov 2006, Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache to
recreate full path at least for text. I have found vn_fullpath function
usefull in this case. I am newbe in C, so it could be stupid question, but
could someone explaine what
Robert Watson wrote:
Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache to
recreate full path at least for text. I have found vn_fullpath function
usefull in this case. I am newbe in C, so it could be stupid question, but
could someone
On Tuesday, 28 November 2006 at 16:46:20 +0100, Oliver Fromme wrote:
Robert Watson wrote:
Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache
to
recreate full path at least for text. I have found vn_fullpath function
usefull in this
:Nikolay, you might want to have a look at the source code
:of the lsof utility (ports/sysutils/lsof). It is able
:to display path names for file descriptors. Maybe you can
:borrow an idea from it.
:
:It might also be worth mentioning that our friends from the
:DragonFly BSD project (derived
On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache
to recreate full path at least for text. I have found vn_fullpath
function usefull in this case. I am newbe in C, so it could be stupid
question, but could
On Monday, 27 November 2006 at 18:20:03 +0300, Ruslan Ermilov wrote:
On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache
to recreate full path at least for text. I have found vn_fullpath
function usefull in
On Mon, Nov 27, 2006 at 05:37:12PM +0200, Nikolay Pavlov wrote:
On Monday, 27 November 2006 at 18:20:03 +0300, Ruslan Ermilov wrote:
On Mon, Nov 27, 2006 at 02:07:40PM +0200, Nikolay Pavlov wrote:
Hi. I am trying to extend fstat utility, so that it can use name cache
to recreate full path
Nikolay Pavlov wrote:
Yes i know about this man, but still not sure how to get *td structure.
In kernel? There's a global variable curthread AFAIK.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
On Monday, 27 November 2006 at 17:12:44 +0100, Ivan Voras wrote:
Nikolay Pavlov wrote:
Yes i know about this man, but still not sure how to get *td structure.
In kernel? There's a global variable curthread AFAIK.
I am not sure. If i understand the fstat code right, it uses kvm
interface
Divacky Roman wrote:
On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote:
hi,
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1 + mem2 etc.
where the mem1/mem2 access can trigger fault. (memory not mapped or
On 31.07.2006 14:12:20, Intron wrote:
Mutex(9) is sometimes too heavy, and has many limitations, while sx(9)
is somewhat enough.
First paragraph from sx(9) manual says:
Shared/exclusive locks are used to protect data that are read
far more often than they are written. Mutexes
[EMAIL PROTECTED] wrote:
On 31.07.2006 14:12:20, Intron wrote:
Mutex(9) is sometimes too heavy, and has many limitations, while sx(9)
is somewhat enough.
First paragraph from sx(9) manual says:
Shared/exclusive locks are used to protect data that are read
far more often
2006/7/30, Divacky Roman [EMAIL PROTECTED]:
On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote:
hi,
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1 + mem2 etc.
where the mem1/mem2 access can trigger fault.
On Monday 31 July 2006 14:15, Attilio Rao wrote:
2006/7/30, Divacky Roman [EMAIL PROTECTED]:
On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote:
hi,
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1
On Sun, 2006-Jul-30 12:57:32 +0200, Divacky Roman wrote:
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1 + mem2 etc.
where the mem1/mem2 access can trigger fault. (memory not mapped or something)
This is normally only an
Divacky Roman wrote:
hi,
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1 + mem2 etc.
where the mem1/mem2 access can trigger fault. (memory not mapped or something)
currently I solve this by using pcb_onfault. this must
On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote:
hi,
while working on SoC linuxolator project I am in a need of this:
I need to do some operation on memory like mem1 = mem1 + mem2 etc.
where the mem1/mem2 access can trigger fault. (memory not mapped or something)
to make it
From kern_umtx.c:
static int
_do_lock(struct thread *td, struct umtx *umtx, long id, int timo)
{
struct umtx_q *uq;
intptr_t owner;
intptr_t old;
int error = 0;
uq = td-td_umtxq;
/*
* Care must be exercised when dealing with umtx structure. It
20060428:
The puc(4) driver has been overhauled. The ebus(4) and sbus(4)
attachments have been removed. Make sure to configure scc(4)
on sparc64. Note also that by default puc(4) will use uart(4)
and not sio(4) for serial ports because interrupt handling has
been
On Sunday 23 July 2006 22:07, 李尚杰 wrote:
The code for ipcperm() call :
93 if (mode IPC_M) {
94 error = suser(td);
95 if (error)
96 return (error);
97 }
116 if
On Mon, 24 Jul 2006, Xin LI wrote:
On 7/24/06, 李尚杰 [EMAIL PROTECTED] wrote:
The code for ipcperm() call :
78 ipcperm(td, perm, mode)
79 struct thread *td;
80 struct ipc_perm *perm;
81 int mode;
82 {
83 struct ucred *cred = td-td_ucred;
84 int
On Mon, 24 Jul 2006, Xin LI wrote:
why not directly return the error in line 94?
I think it makes sense to remove the assignment and the 'error' variable.
Let's see Robert's opinion.
I'm sorry, my previous answer was based on a mis-reading of the question --
you're not suggesting
Quoting Robert Watson [EMAIL PROTECTED] (from Mon, 24 Jul 2006
13:04:45 +0100 (BST)):
also. I would be interested in seeing reasonable restructurings of
this code, perhaps as a set of blocks that looks at each requested
operation or set of related operations and authorizes them sequentially.
On 7/24/06, 李尚杰 [EMAIL PROTECTED] wrote:
The code for ipcperm() call :
78 ipcperm(td, perm, mode)
79 struct thread *td;
80 struct ipc_perm *perm;
81 int mode;
82 {
83 struct ucred *cred = td-td_ucred;
84 int error;
85
86 if (cred-cr_uid !=
On Thu, Jul 13, 2006 at 06:12:40PM +0200, Divacky Roman wrote:
hi,
durin my work on SoC I happened to be in a need of catching the transition
of
execve() from fbsd binary to linux binary and back.
Kostik Belousov suggested using the process_exit handler event but it doesnt
On 6/24/06, Frank Mitchell [EMAIL PROTECTED] wrote:
Let's assume your Block Device is an ATA Hard Disk and you're using
FreeBSD
6.0 like me.
Take a look at sys/ata.h and you'll see a large fully-commented
structure,
struct ata_params, which is used to return the information from the ATA
Let's assume your Block Device is an ATA Hard Disk and you're using FreeBSD
6.0 like me.
Take a look at sys/ata.h and you'll see a large fully-commented structure,
struct ata_params, which is used to return the information from the ATA
IDENTIFY DEVICE command using something like:
On Fri, 23 Jun 2006 17:47:57 +0300 (EEST)
Dmitry Pryanishnikov [EMAIL PROTECTED] wrote:
Hello!
I'm writing an utility that should examine some bytes of a large file
and modify them - that't all. I've decided to mmap() the file:
void *diskp;
if ((fd=open(argv[1], O_RDWR)) ==
In the last episode (Jun 23), Dmitry Pryanishnikov said:
I'm writing an utility that should examine some bytes of a large
file and modify them - that't all. I've decided to mmap() the file:
void *diskp;
if ((fd=open(argv[1], O_RDWR)) == -1)
err(EX_NOINPUT, Can't open %s
Hello!
On Fri, 23 Jun 2006, Konstantin Belousov wrote:
if ((diskp=mmap(NULL, 512,
PROT_READ | PROT_WRITE, 0, fd, 0)) == MAP_FAILED)
err(EX_IOERR, Can't mmap() file);
shows actual first byte of my file. But modification doesn't get written
back to the disk, file
In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed:
So I guess my question is: is there a POSIX compatible function that
will allow me to check the size of a given block device?
I'd be surprised - POSIX doesn't seem to deal with block devices at all.
Checking the sources to df, it uses
There are no block devices in FreeBSD, only character devices
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics-block.html
dave c
In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed:
So I guess my question is: is there a POSIX compatible function that
will allow
In the last episode (Jun 22), Mike Meyer said:
In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed:
So I guess my question is: is there a POSIX compatible function that
will allow me to check the size of a given block device?
I'd be surprised - POSIX doesn't seem to deal with block
Dan Nelson wrote:
In the last episode (Jun 22), Mike Meyer said:
In [EMAIL PROTECTED], Andrew [EMAIL PROTECTED] typed:
So I guess my question is: is there a POSIX compatible function that
will allow me to check the size of a given block device?
I'd be surprised - POSIX doesn't seem to deal
101 - 200 of 566 matches
Mail list logo