rh

Check-in [6827c7f100]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add access to allocated blocks, so I can find files with allocation holes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:6827c7f10048f0e0e886c819a82fca4194dd31c0d4cd4fabd3670a40f484df51
User & Date: ajv-899-334-8894@vsta.org 2010-04-22 03:03:16
Context
2010-04-23
03:11
Start supporting large files check-in: d10742d6cc user: ajv-899-334-8894@vsta.org tags: master, trunk
2010-04-22
03:03
Add access to allocated blocks, so I can find files with allocation holes check-in: 6827c7f100 user: ajv-899-334-8894@vsta.org tags: master, trunk
03:02
Get rid of deprecated sys_nerr/sys_errlist check-in: 9802a7a9b5 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rhcmds.c.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
327
328
329
330
331
332
333






334
335
336
337
338
339
340
 * These functions are simple, and behave like RPN operators, that is
 * they use the last two values on the stack, apply an operator
 * and push the result. Similarly for unary ops.
 *
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhcmds.c,v 1.2 1994/01/26 01:49:21 rick Exp $";
#endif

#include "rh.h"
#include "rhdata.h"
#include "sysinfo.h"

void c_or(instr_value *v)
................................................................................
}

void c_rdev(instr_value *v)
{
    Stack[SP++] = attr.buf->st_rdev;
    return;
}







void c_size(instr_value *v)
{
    Stack[SP++] = attr.buf->st_size;
    return;
}








|







 







>
>
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
...
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
 * These functions are simple, and behave like RPN operators, that is
 * they use the last two values on the stack, apply an operator
 * and push the result. Similarly for unary ops.
 *
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhcmds.c,v 1.1 2008/12/27 00:56:03 vandys Exp vandys $";
#endif

#include "rh.h"
#include "rhdata.h"
#include "sysinfo.h"

void c_or(instr_value *v)
................................................................................
}

void c_rdev(instr_value *v)
{
    Stack[SP++] = attr.buf->st_rdev;
    return;
}

void c_blksize(instr_value *v)
{
    Stack[SP++] = attr.buf->st_blocks;
    return;
}

void c_size(instr_value *v)
{
    Stack[SP++] = attr.buf->st_size;
    return;
}

Changes to rhcmds.h.

1
2
3
4
5
6
7
8
9
10
11
12
13
..
62
63
64
65
66
67
68

69
70
71
72
73
/*
 * rhcmds.h
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 *
 * rcsid: $Id: rhcmds.h,v 1.2 1994/01/25 22:39:30 rick Exp $
 */

#if !defined(__RHCMDS_H__)
#define __RHCMDS_H__

extern void c_and(instr_value *);
extern void c_atime(instr_value *);
................................................................................
extern void c_prune(instr_value *);
extern void c_qm(instr_value *);
extern void c_rdev(instr_value *);
extern void c_return(instr_value *);
extern void c_rshift(instr_value *);
extern void c_samefs(instr_value *);
extern void c_size(instr_value *);

extern void c_syscall(instr_value *);
extern void c_uid(instr_value *);
extern void c_uniminus(instr_value *);

#endif	/* __RHCMDS_H__ */





|







 







>





1
2
3
4
5
6
7
8
9
10
11
12
13
..
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * rhcmds.h
 *
 * Written by:	Rick Ohnemus	(rick@sterling.com)
 *
 * rcsid: $Id: rhcmds.h,v 1.1 2008/12/27 00:56:03 vandys Exp vandys $
 */

#if !defined(__RHCMDS_H__)
#define __RHCMDS_H__

extern void c_and(instr_value *);
extern void c_atime(instr_value *);
................................................................................
extern void c_prune(instr_value *);
extern void c_qm(instr_value *);
extern void c_rdev(instr_value *);
extern void c_return(instr_value *);
extern void c_rshift(instr_value *);
extern void c_samefs(instr_value *);
extern void c_size(instr_value *);
extern void c_blksize(instr_value *);
extern void c_syscall(instr_value *);
extern void c_uid(instr_value *);
extern void c_uniminus(instr_value *);

#endif	/* __RHCMDS_H__ */

Changes to rhdata.c.

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
109
110
111
112
113
114
115

116
117
118
119
120
121
122
 * Written by:	Ken Stauffer
 *		Rick Ohnemus	(rick@sterling.com)
 *
 * Global Functions: rhfinish, rhinit
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhdata.c,v 1.1 1994/01/12 19:38:27 rick Exp $";
#endif

#include "rh.h"
#include "rhcmds.h"
#include "rhgram.h"

#if !defined(S_IREAD)
................................................................................
    { "IWRITE",   NUMBER,      FALSE,  S_IWRITE,          c_number },
    { "IWUSR",    NUMBER,      FALSE,  S_IWUSR,           c_number },
    { "IXGRP",    NUMBER,      FALSE,  S_IXGRP,           c_number },
    { "IXOTH",    NUMBER,      FALSE,  S_IXOTH,           c_number },
    { "IXUSR",    NUMBER,      FALSE,  S_IXUSR,           c_number },
    { "atime",    TIME_FIELD,  TRUE,   0,                 c_atime },
    { "baselen",  BLTIN,       FALSE,  0,                 c_baselen },

    { "ctime",    TIME_FIELD,  TRUE,   0,                 c_ctime },
    { "days",     NUMBER,      FALSE,  24 * 60 * 60,      c_number },
    { "depth",    BLTIN,       FALSE,  0,                 c_depth },
    { "dev",      FIELD,       TRUE,   0,                 c_dev },
    { "dirlen",   BLTIN,       FALSE,  0,                 c_dirlen },
    { "gid",      FIELD,       TRUE,   0,                 c_gid },
    { "group",    FIELD,       TRUE,   0,                 c_gid },







|







 







>







4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
 * Written by:	Ken Stauffer
 *		Rick Ohnemus	(rick@sterling.com)
 *
 * Global Functions: rhfinish, rhinit
 */

#if !defined(lint)
static char rcsid[] = "$Id: rhdata.c,v 1.1 2008/12/27 00:56:03 vandys Exp vandys $";
#endif

#include "rh.h"
#include "rhcmds.h"
#include "rhgram.h"

#if !defined(S_IREAD)
................................................................................
    { "IWRITE",   NUMBER,      FALSE,  S_IWRITE,          c_number },
    { "IWUSR",    NUMBER,      FALSE,  S_IWUSR,           c_number },
    { "IXGRP",    NUMBER,      FALSE,  S_IXGRP,           c_number },
    { "IXOTH",    NUMBER,      FALSE,  S_IXOTH,           c_number },
    { "IXUSR",    NUMBER,      FALSE,  S_IXUSR,           c_number },
    { "atime",    TIME_FIELD,  TRUE,   0,                 c_atime },
    { "baselen",  BLTIN,       FALSE,  0,                 c_baselen },
    { "blocks",   FIELD,       TRUE,   0,                 c_blksize },
    { "ctime",    TIME_FIELD,  TRUE,   0,                 c_ctime },
    { "days",     NUMBER,      FALSE,  24 * 60 * 60,      c_number },
    { "depth",    BLTIN,       FALSE,  0,                 c_depth },
    { "dev",      FIELD,       TRUE,   0,                 c_dev },
    { "dirlen",   BLTIN,       FALSE,  0,                 c_dirlen },
    { "gid",      FIELD,       TRUE,   0,                 c_gid },
    { "group",    FIELD,       TRUE,   0,                 c_gid },