- return l < r ? -1 : (l > r);
+ vaddr_t vl = (vaddr_t)l;
+ vaddr_t vr = (vaddr_t)r;
+
+ return vl < vr ? -1 : (vl > vr);
}
RB_PROTOTYPE(hiballoc_addr, hiballoc_entry, hibe_entry, hibe_cmp)
--
Michal Mazurek
p->p_wchan = 0;
- TAILQ_REMOVE(qp, p, p_runq);
+ TAILQ_REMOVE(&slpque, p, p_runq);
if (p->p_stat == SSLEEP)
setrunnable(p);
}
--
Michal Mazurek
2014 04:31:42 - 1.23
+++ sys/sys/sem.h 1 Sep 2016 07:22:26 -
@@ -195,4 +195,4 @@ int semop(int, struct sembuf *, size_t);
__END_DECLS
#endif /* !_KERNEL */
-#endif /* !_SEM_H_ */
+#endif /* !_SYS_SEM_H_ */
--
Michal Mazurek
*, size_t);
int ktruser(struct proc *, const char *, const void *, size_t);
void ktrexec(struct proc *, int, const char *, ssize_t);
void ktrpledge(struct proc *, int, uint64_t, int);
--
Michal Mazurek
not need locks
sycall_flags = sprintf("SY_NOLOCK | %s", sycall_flags)
f++
--
Michal Mazurek
if (SCARG(uap, pid) < THREAD_PID_OFFSET && tr->ps_single)
--
Michal Mazurek
scallargs.h 27 Jun 2016 16:52:01 - 1.185
+++ sys/sys/syscallargs.h 2 Sep 2016 13:10:02 -
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscallargs.h,v 1.185 2016/06/27 16:52:01 jsing Exp $ */
+/* $OpenBSD$ */
/*
* System call argument lists.
@@ -1098,6 +1098,15 @@ struct sys___set_tcb_args {
syscallarg(void *) tcb;
};
+struct sys_futex_args {
+ syscallarg(void *) uaddr;
+ syscallarg(int) futex_op;
+ syscallarg(int) val;
+ syscallarg(const struct timespec *) tp;
+ syscallarg(int *) uaddr2;
+ syscallarg(int) val3;
+};
+
/*
* System call prototypes.
*/
@@ -1347,3 +1356,4 @@ int sys_symlinkat(struct proc *, void *,
intsys_unlinkat(struct proc *, void *, register_t *);
intsys___set_tcb(struct proc *, void *, register_t *);
intsys___get_tcb(struct proc *, void *, register_t *);
+intsys_futex(struct proc *, void *, register_t *);
--
Michal Mazurek
);
if (setsockopt(s, SOL_SOCKET, SO_RTABLE, &rtableid,
sizeof(rtableid)) == -1)
err(1, "setsockopt SO_RTABLE");
--
Michal Mazurek
On 12:12:11, 2.09.16, Ted Unangst wrote:
> Michal Mazurek wrote:
> > worms(6) does this more concisely:
> >
> > errx(1, "length (2-1024) is %s: %s", errstr,
>
> there's multiple schools of thought here, but i've always preferred somewhat
>
@@ -176,6 +176,7 @@ Specifies the number of data bytes to be
The default is 56,
which translates into 64 ICMP data bytes
when combined with the 8 bytes of ICMP header data.
+The maximum packet size is 65467.
.It Fl T Ar toskeyword
Change IPv4 TOS value.
.Ar toskeyword
--
Michal Mazurek
It Fl v
--
Michal Mazurek
LOCK_UPTIME 5
#if __BSD_VISIBLE
-#define__CLOCK_USE_TICKET_LOCKS8 /* flag for
__thrsleep() */
-
/*
* Per-process and per-thread clocks encode the PID or TID into the
* high bits, with the type in the bottom bits
--
Michal Mazurek
-
@@ -39,8 +39,6 @@
#define CLOCK_UPTIME 5
#if __BSD_VISIBLE
-#define__CLOCK_USE_TICKET_LOCKS8 /* flag for
__thrsleep() */
-
/*
* Per-process and per-thread clocks encode the PID or TID into the
* high bits, with the type in the bottom bits
--
Michal Mazurek
r outgoing packets.
.It Fl v
--
Michal Mazurek
rror = __thrsleep(self, 0 | _USING_TICKETS, NULL,
- &mutex->lock.ticket, &self->delayed_cancel);
+ error = __thrsleep(self, 0, NULL, &mutex->lock.ticket,
+ &self->delayed_cancel);
/*
* If we took a normal signal (not from
--
Michal Mazurek
clock_gettime 2
+clock id.
.El
.Pp
.Fn __thrwakeup
--
Michal Mazurek
lf, 0, NULL, &mutex->lock.ticket,
+ error = __thrsleep(self, 0, NULL, &mutex->lock,
&self->delayed_cancel);
/*
Index: lib/librthread/rthread_tls.c
===
RCS file:
7 @@ DASM= ${ASM:.o=.do}
# syscalls that CANNOT FAIL. They can return whatever value they want,
# they just never want to set errno.
ASM_NOERR=__get_tcb.o __set_tcb.o __threxit.o __thrsleep.o __thrwakeup.o \
+ futex.o \
getdtablecount.o getegid.o geteuid.o getgid.o getlogin_r.o \
getpgrp.o getpid.o getppid.o getrtable.o getthrid.o getuid.o \
issetugid.o \
--
Michal Mazurek
== NULL)
+ if (asprintf(&cp, "%s,%s", s0, s1) == -1)
err(1, NULL);
- (void)snprintf(cp, i, "%s,%s", s0, s1);
} else
cp = strdup(s1);
free(s0);
- return (cp);
+ return cp;
}
void
--
Michal Mazurek
#include "pathnames.h"
--
Michal Mazurek
(&p, "../compile/%s", last_component) == -1)
+ err(1, NULL);
}
defbuilddir = (argc == 0) ? "." : p;
--
Michal Mazurek
1.20
+++ lib/libc/gen/err.3 14 Sep 2016 07:28:26 -
@@ -189,6 +189,10 @@ if ((fd = open(block_device, O_RDONLY, 0
.Xr perror 3 ,
.Xr printf 3 ,
.Xr strerror 3
+.Sh STANDARDS
+These functions are
+.Bx
+extensions.
.Sh HISTORY
The functions
.Fn err ,
--
Michal Mazurek
16 19:24:51 -
@@ -543,7 +543,7 @@ If set to a positive integer,
output is formatted to the given width in columns.
Otherwise,
.Nm
-defaults to the terminal width \(mi 1,
+defaults to the terminal width \(mi1,
or 79 columns if none of
.Dv stdout ,
.Dv stderr
--
Michal Mazurek
1,
or 79 columns if none of
.Dv stdout ,
.Dv stderr
--
Michal Mazurek
drive in
/mnt and reload the interface:
+
+
+ifconfig iwm0 down
+ifconfig iwm0 up
+
+
+And then unmount the drive.
+
+
+Be aware that the installer uses /mnt to copy the
+distribution sets to disk, and thus loading the firmware must be
+performed before it is started.
--
Michal Mazurek
in the directory
.Pa /etc/firmware .
+In addition to that, if the kernel is a ramdisk kernel, the extra
+directory
+.Pa /mnt/etc/firmware
+will also be used for the lookup.
Memory for the firmware is allocated using
.Xr malloc 9
with type
--
Michal Mazurek
o
ls -l file
sleep 5
done
--
Michal Mazurek
On 22:49:38, 20.12.16, Jason McIntyre wrote:
> On Tue, Dec 20, 2016 at 10:58:40PM +0100, Michal Mazurek wrote:
> > While there is nothing wrong with "while true", "while :" is better
> > and used a lot more often in the source tree.
> >
> > OK?
&g
a number is factored, it is printed
and the list of factors on a single line.
Factors are listed in ascending order, and are preceded by a space.
If a factor divides a value more than once, it will be printed
-more than once.
+that number of times.
.Pp
When
.Nm
--
Michal Mazurek
@ -430,6 +438,14 @@ Plenty of subpackages are available for
Ruby
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/ruby";>lang/ruby
+
+
+
+
+
+Rust
+
+http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/rust";>lang/rust
--
Michal Mazurek
aid,
since the core file represents the time of failure,
rather than when the bogus pointer was used.
+.It Cm a
+.Dq Never Abort .
+Never call
+.Xr abort 3 ,
+even if
+.Dq xmalloc
+or
+.Dq Junk
+is set.
.It Cm C
.Dq Canaries .
Add canaries at the end of allocations in order to detect
Th
RCS file: include/stdnoreturn.h
diff -N include/stdnoreturn.h
--- /dev/null 1 Jan 1970 00:00:00 -
+++ include/stdnoreturn.h 30 Dec 2015 16:43:53 -
@@ -0,0 +1,12 @@
+/* $OpenBSD$ */
+
+/*
+ * Public domain.
+ */
+
+#ifndef_STDNORETURN_H_
+#define _STDNORETURN_H_
+
+#define noreturn _Noreturn
+
+#endif /* _STDNORETURN_H_ */
--
Michal Mazurek
It Cm create Ar path Fl s Ar size
Creates a VM disk image file with the specified
--
Michal Mazurek
"%d", errno);
- free(pkt);
- free(vr);
- return (0);
+ goto out;
}
ret = 1;
@@ -1170,6 +1158,7 @@ vionet_notifyq(struct vionet_dev *dev)
log_warnx("vionet: tx error writing vio ring");
}
+out:
free(vr);
free(pkt);
--
Michal Mazurek
t, const char *);
struct vmd_vm *vm_getbyvmid(uint32_t);
struct vmd_vm *vm_getbyid(uint32_t);
struct vmd_vm *vm_getbyname(const char *);
--
Michal Mazurek
battlestar.c
--- games/battlestar/battlestar.c 4 Dec 2015 17:34:40 - 1.18
+++ games/battlestar/battlestar.c 1 Jan 2016 15:28:07 -
@@ -40,8 +40,6 @@
#include "extern.h"
#include "pathnames.h"
-int main(int, char *[]);
-
int
main(int argc, char *argv
@@
#ifndef _MACHINE_VMMVAR_H_
#define _MACHINE_VMMVAR_H_
-#define VMM_HV_SIGNATURE "OpenBSDVMM58"
+#define VMM_HV_SIGNATURE "OpenBSDVMM59"
#define VMM_MAX_DISKS_PER_VM 2
#define VMM_MAX_PATH_DISK 128
--
Michal Mazurek
struct privsep_proc *procs, unsigned int nproc)
--
Michal Mazurek
dprintf(x...) do { log_debug(x); } while(0)
#else
#define dprintf(x...)
-#endif /* VMM_DEBUG */
+#endif /* VMD_DEBUG */
enum imsg_type {
IMSG_VMDOP_START_VM_REQUEST = IMSG_PROC_MAX,
--
Michal Mazurek
-
@@ -119,7 +119,6 @@ int matchino(const void *, const void *)
int matchcache(const void *, const void *);
void cacheino(ufsino_t, void *);
void *cached(ufsino_t);
-int main(int, char *[]);
char *rawname(char *);
void format_entry(const char *, struct direct *);
--
Michal Mazurek
XIT STATUS
.Ex -std fold
--
Michal Mazurek
jot.1 20 Jan 2014 05:07:48 - 1.18
+++ jot/jot.1 4 Jan 2016 19:56:51 -
@@ -313,3 +313,10 @@ To print all lines 80 characters or long
.Xr yes 1 ,
.Xr arc4random 3 ,
.Xr printf 3
+.Sh HISTORY
+The
+.Nm
+utility first appeared in
+.Bx 4.2 .
+.Sh AUTHORS
+.An John A. Kunze
--
M
width
column positions (or bytes).
+If a space character does not exist within the width, then
+a longer line will still be split at the width.
.It Fl w Ar width
Specifies a line width to use instead of the default 80 characters.
.El
--
Michal Mazurek
" redirhost-list "}" )
-[ portspec ] [ pooltype ] [ "static-port" ] |
-[ route ] | [ "set tos" tos ] |
-[ [ "!" ] "received-on" ( interface-name | interface-group ) ]
+ "af-to" af "from" ( redirhost | "{" redirhost-list "}" )
+ [ "to" ( redirhost | "{" redirhost-list "}" ) ] |
+ "binat-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] |
+ "rdr-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] |
+ "nat-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] [ "static-port" ] |
+ [ route ] | [ "set tos" tos ] |
+ [ [ "!" ] "received-on" ( interface-name | interface-group ) ]
scrubopts = scrubopt [ [ "," ] scrubopts ]
scrubopt = "no-df" | "min-ttl" number | "max-mss" number |
--
Michal Mazurek
rt" ] |
-[ route ] | [ "set tos" tos ] |
- [ [ "!" ] "received-on" ( interface-name | interface-group ) ]
+ "af-to" af "from" ( redirhost | "{" redirhost-list "}" )
+ [ "to" ( redirhost | "{" redirhost-list "}" ) ] |
+ "binat-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] |
+ "rdr-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] |
+ "nat-to" ( redirhost | "{" redirhost-list "}" )
+ [ portspec ] [ pooltype ] [ "static-port" ] |
+ [ route ] | [ "set tos" tos ] |
+ [ [ "!" ] "received-on" ( interface-name | interface-group ) ]
scrubopts = scrubopt [ [ "," ] scrubopts ]
scrubopt = "no-df" | "min-ttl" number | "max-mss" number |
--
Michal Mazurek
On 07:52:28, 19.05.17, Jason McIntyre wrote:
> On Fri, May 19, 2017 at 08:34:54AM +0200, Michal Mazurek wrote:
> > Now that it was commited, what remains is to convert tabs to spaces inside
> > a
> > literal block:
> >
>
> morning.
>
> what's the
+ if (ioctl(s, SIOCGIFGROUP, (caddr_t)&ifgr) == -1)
+ err(1, "SIOCGIFGROUP");
-ifg = ifgr.ifgr_groups;
-for (; ifg && len >= sizeof(struct ifg_req); ifg++) {
-len -= sizeof(struct ifg_req);
+ ifg = ifgr.i
ifg = ifgr.ifgr_groups;
+ for (; ifg && len >= sizeof(struct ifg_req); ifg++) {
+ len -= sizeof(struct ifg_req);
+ if (strcmp(ifg->ifgrq_group, groupname) == 0) {
+ ret = 1;
+ break;
+ }
+ }
+ free(ifgr.ifgr_groups);
+
+end:
+ close(s);
+ return (ret);
}
--
Michal Mazurek
for (ifm = (struct if_msghdr *)buf; ifm < (struct if_msghdr *)lim;) {
+ if (ifm->ifm_type == RTM_IFINFO) {
+ if (ifm->ifm_version == RTM_VERSION) {
+ (*ifmlist_p)[ifm->ifm_index] = ifm;
+ }
On Sat, May 28, 2011 at 01:25:15PM +0200, Michal Mazurek wrote:
> After multiple ifconfig create and destroy of bridge and tun interfaces rtadvd
> crashed just seconds after being started.
Here is a way to recreate the crash:
$ cat /etc/rtadvd.conf
tun6:addr="fd00:1234::1":prefi
available filesystem types see the fstypenames table in
+.Pa /usr/include/sys/disklabel.h .
The editor commands are as follows:
.Bl -tag -width "p [unit] "
.It Cm \&? \*(Ba h
--
Michal Mazurek
wrterror("mapalign bad alignment", NULL);
return MAP_FAILED;
}
--
Michal Mazurek
ENAMETOOLONG;
goto err;
--
Michal Mazurek
space 3
function) are skipped.
.Sh RETURN VALUES
--
Michal Mazurek
scribed by
.Fa acc_mode ,
based on the
+.Fa type ,
.Fa file_mode ,
.Fa uid ,
and
--
Michal Mazurek
ess than or equal to zero prior to calling
+.Fn vdrop ,
+the system will panic.
+If the vnode is no longer referenced, it will be freed.
.Sh SEE ALSO
.Xr vnode 9
.Sh AUTHORS
--
Michal Mazurek
ecrements the
+.Va v_holdcnt
+of the vnode.
+If the holdcount is zero prior to calling
+.Fn vdrop ,
+the system will panic.
+If the vnode is no longer referenced, it will be freed.
.Sh SEE ALSO
.Xr vnode 9
.Sh AUTHORS
--
Michal Mazurek
101 - 157 of 157 matches
Mail list logo