OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20080929-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
struct option {
2
  const char *name;
3
  int has_arg;
4
  int *flag;
5
  int val;
6
};
7
enum {
8
  UBI_DYNAMIC_VOLUME = 3,  UBI_STATIC_VOLUME = 4, };
9
typedef void * libubi_t;
10
struct ubi_dev_info {
11
  int leb_size;
12
};
13
struct args {
14
  int vol_id;
15
  int vol_type;
16
  long long bytes;
17
  int lebs;
18
  int alignment;
19
  const char *node;
20
  int maxavs;
21
  int devn;
22
};
23
static struct args args = {
24
  .vol_type = UBI_DYNAMIC_VOLUME,  .bytes = -1,  .lebs = -1,  .alignment = 1,  .vol_id = (-1),  .devn = -1, };
25
extern libubi_t libubi_open (int);
26
extern int ubi_get_dev_info (libubi_t, const char *, struct ubi_dev_info *);
27
int main(int argc, char * const argv[]) {
28
  int err;
29
  libubi_t libubi;
30
  struct ubi_dev_info dev_info;
31
  libubi = libubi_open(1);
32
  if (!libubi)
33
    return 0;
34
  err = ubi_get_dev_info(libubi, args.node, &dev_info);
35
  if (args.maxavs) {
36
    args.bytes = dev_info.leb_size;
37
  }
38
  return 0;
39
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.