This file is indexed.

/usr/share/doc/libburn-doc/examples/poll.c is in libburn-doc 1.4.8-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */

#include "libburn/libburn.h"
#include "libburn/toc.h"
#include "libburn/mmc.h"

#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <string.h>
#include <assert.h>

static struct burn_drive_info *drives;
static unsigned int n_drives;
int NEXT;

static void catch_int ()
{
	NEXT = 1;
}

static void poll_drive(int d)
{
	fprintf(stderr, "polling disc in %s - %s:\n",
		drives[d].vendor, drives[d].product);

	if (!burn_drive_grab(drives[d].drive, 1)) {
		fprintf(stderr, "Unable to open the drive!\n");
		return;
	}

	while (burn_drive_get_status(drives[d].drive, NULL))
		usleep(1000);

	while (burn_disc_get_status(drives[d].drive) == BURN_DISC_UNREADY)
		usleep(1000);
	
	while (NEXT == 0) {
		sleep(2);
		mmc_get_event(drives[d].drive);
	}
	burn_drive_release(drives[d].drive, 0);
}

int main()
{
    	int i;
	struct sigaction newact;
	struct sigaction oldact;
	fprintf(stderr, "Initializing library...");
	if (burn_initialize())
		fprintf(stderr, "Success\n");
	else {
		printf("Failed\n");
		return 1;
	}

	fprintf(stderr, "Scanning for devices...");
	while (!burn_drive_scan(&drives, &n_drives)) ;
	fprintf(stderr, "Done\n");
	if (!drives) {
	    	printf("No burner found\n");
		return 1;
	} 

	memset(&newact, 0, sizeof(newact));
	newact.sa_handler = catch_int;
	sigaction(SIGINT, &newact, &oldact);
	for (i = 0; i < (int) n_drives; i++) {
	    NEXT=0;
	    poll_drive(i);
	}
	sigaction(SIGINT, &oldact, NULL);
	burn_drive_info_free(drives);
	burn_finish();
	return 0;
}