~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to src/path.h

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        PATH_EXISTS_GLOB,
42
42
        PATH_DIRECTORY_NOT_EMPTY,
43
43
        PATH_CHANGED,
 
44
        PATH_MODIFIED,
44
45
        _PATH_TYPE_MAX,
45
46
        _PATH_TYPE_INVALID = -1
46
47
} PathType;
57
58
        int primary_wd;
58
59
 
59
60
        bool previous_exists;
60
 
 
61
61
} PathSpec;
62
62
 
 
63
int path_spec_watch(PathSpec *s, Unit *u);
 
64
void path_spec_unwatch(PathSpec *s, Unit *u);
 
65
int path_spec_fd_event(PathSpec *s, uint32_t events);
 
66
void path_spec_done(PathSpec *s);
 
67
 
 
68
static inline bool path_spec_owns_inotify_fd(PathSpec *s, int fd) {
 
69
        return s->inotify_fd == fd;
 
70
}
 
71
 
 
72
typedef enum PathResult {
 
73
        PATH_SUCCESS,
 
74
        PATH_FAILURE_RESOURCES,
 
75
        _PATH_RESULT_MAX,
 
76
        _PATH_RESULT_INVALID = -1
 
77
} PathResult;
 
78
 
63
79
struct Path {
64
 
        Meta meta;
 
80
        Unit meta;
65
81
 
66
82
        LIST_HEAD(PathSpec, specs);
67
83
 
68
 
        Unit *unit;
 
84
        UnitRef unit;
69
85
 
70
86
        PathState state, deserialized_state;
71
87
 
72
 
        bool failure;
73
88
        bool inotify_triggered;
74
89
 
75
90
        bool make_directory;
76
91
        mode_t directory_mode;
 
92
 
 
93
        PathResult result;
77
94
};
78
95
 
79
96
void path_unit_notify(Unit *u, UnitActiveState new_state);
90
107
const char* path_type_to_string(PathType i);
91
108
PathType path_type_from_string(const char *s);
92
109
 
 
110
const char* path_result_to_string(PathResult i);
 
111
PathResult path_result_from_string(const char *s);
 
112
 
93
113
#endif