summaryrefslogtreecommitdiff
path: root/files.h
blob: 67a28967b6248fac6f09900c4e425900bd0f85a7 (plain)
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
/*
 * nvidia-installer: A tool for installing NVIDIA software packages on
 * Unix and Linux systems.
 *
 * Copyright (C) 2003 NVIDIA Corporation
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the:
 *
 *      Free Software Foundation, Inc.
 *      59 Temple Place - Suite 330
 *      Boston, MA 02111-1307, USA
 */

#ifndef __NVIDIA_INSTALLER_FILES_H__
#define __NVIDIA_INSTALLER_FILES_H__

#include "nvidia-installer.h"

int remove_directory(Options *op, const char *victim);
int touch_directory(Options *op, const char *victim);
int copy_file(Options *op, const char *srcfile,
              const char *dstfile, mode_t mode);
char *write_temp_file(Options *op, const int len,
                      const unsigned char *data, mode_t perm);
void select_tls_class(Options *op, Package *p); /* XXX move? */
int set_destinations(Options *op, Package *p); /* XXX move? */
int get_license_acceptance(Options *op); /* XXX move? */
int get_prefixes(Options *op); /* XXX move? */
int add_kernel_module_to_package(Options *op, Package *p);
void remove_non_kernel_module_files_from_package(Options *op, Package *p);
void remove_trailing_slashes(char *s);
int mode_string_to_mode(Options *op, char *s, mode_t *mode);
char *mode_to_permission_string(mode_t mode);
int directory_exists(Options *op, const char *dir);
int confirm_path(Options *op, const char *path);
int mkdir_recursive(Options *op, const char *path, const mode_t mode);
char *get_symlink_target(Options *op, const char *filename);
int install_file(Options *op, const char *srcfile,
                 const char *dstfile, mode_t mode);
size_t get_file_size(Options *op, const char *filename);
size_t fget_file_size(Options *op, const int fd);
char *get_tmpdir(Options *op);
char *make_tmpdir(Options *op);
int nvrename(Options *op, const char *src, const char *dst);
int check_for_existing_rpms(Options *op);
int copy_directory_contents(Options *op, const char *src, const char *dst);
int pack_precompiled_kernel_interface(Options *op, Package *p);
void process_libGL_la_files(Options *op, Package *p);

#endif /* __NVIDIA_INSTALLER_FILES_H__ */