Deleted Added
full compact
core.c (249674) core.c (249677)
1/*-
2 * Copyright (c) 2013 Mikolaj Golub <trociny@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2013 Mikolaj Golub <trociny@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/lib/libprocstat/core.c 249674 2013-04-20 07:59:44Z trociny $
26 * $FreeBSD: head/lib/libprocstat/core.c 249677 2013-04-20 08:03:56Z trociny $
27 */
28
29#include <sys/param.h>
30#include <sys/elf.h>
31#include <sys/user.h>
32
33#include <assert.h>
34#include <err.h>

--- 139 unchanged lines hidden (view full) ---

174 case PSC_TYPE_UMASK:
175 n_type = NT_PROCSTAT_UMASK;
176 structsize = sizeof(u_short);
177 break;
178 case PSC_TYPE_RLIMIT:
179 n_type = NT_PROCSTAT_RLIMIT;
180 structsize = sizeof(struct rlimit) * RLIM_NLIMITS;
181 break;
27 */
28
29#include <sys/param.h>
30#include <sys/elf.h>
31#include <sys/user.h>
32
33#include <assert.h>
34#include <err.h>

--- 139 unchanged lines hidden (view full) ---

174 case PSC_TYPE_UMASK:
175 n_type = NT_PROCSTAT_UMASK;
176 structsize = sizeof(u_short);
177 break;
178 case PSC_TYPE_RLIMIT:
179 n_type = NT_PROCSTAT_RLIMIT;
180 structsize = sizeof(struct rlimit) * RLIM_NLIMITS;
181 break;
182 case PSC_TYPE_OSREL:
183 n_type = NT_PROCSTAT_OSREL;
184 structsize = sizeof(int);
185 break;
182 default:
183 warnx("unknown core stat type: %d", type);
184 return (NULL);
185 }
186
187 offset = core->pc_phdr.p_offset;
188 eoffset = offset + core->pc_phdr.p_filesz;
189

--- 85 unchanged lines hidden ---
186 default:
187 warnx("unknown core stat type: %d", type);
188 return (NULL);
189 }
190
191 offset = core->pc_phdr.p_offset;
192 eoffset = offset + core->pc_phdr.p_filesz;
193

--- 85 unchanged lines hidden ---